Linux Basic Commands

2,679 views

Published on

Learn Linux Basic commands
By: Students from Jordan University
Nadine Shorbaji
Hanan Nimer

Published in: Education
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,679
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
188
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Linux Basic Commands

  1. 1. This slides for every one who want to learn Linux in our Arab World and the whole World..Thanks for every one who sharing us his experience and help us to learn linux .. :)
  2. 2. 1. Open terminal:2. Type: man hier
  3. 3. How Linux is Organized??!
  4. 4. Cli : Command Line interface..
  5. 5. 1. Open terminal: 2. Type: cat  /etc/shells
  6. 6.  *What is MyShell:   $ echo  $SHELL  * Change Shell:  $ chsh  
  7. 7. $ command   ­options   parameter 
  8. 8. user @ computer­name:~ $  whoami user hostname computer­name
  9. 9.   user @ computer­name:~ $  User Home Folder pwd /home/user1
  10. 10. Magic command Sudo : Super User Do sudo su sudo -i
  11. 11. Switch user : su su user-nameChange user password passwd
  12. 12. Users logs-Who logged in: $ Who or w-Last Sessions: $ last
  13. 13. Change Directory: cd cd cd . cd .. cd ~ cd / cd Desktop/
  14. 14. List Files: ls ls ls -a ls directory ls -l file||dir man ls Get  manual
  15. 15. Create Directory : mkdir mkdir UBUNTURemove Directory : rmdir rmdir UBUNTU
  16. 16. Create Filetouch <file1> <file2> <....>cat > file-name newcat >> file-name update
  17. 17. Read File cat path/file-name Remove File rm path/file-nameYou can also do stuff like rm b* with theasterisk. For removing a collections of filesstarted with litter b.
  18. 18. Reading Files head -# file-name tail -# file-name less path/file-name more path/file-name gedit path/file-name
  19. 19. Text Search : grepg/re/p (global / regular expression / print). grep -i pattern file-name ignore case grep -v pattern file-name all except patt grep -w pattern file-name as 1 word *.txt /directory
  20. 20. Continued....● whereis ls : Display information aboutthe location of a command• which ls : Display which version of acommand will execute .• pwd: print working directory
  21. 21. Try...• Try man –f ls whatis ls• Try man –k ls apropos ls
  22. 22. Rebootsudo reboot
  23. 23. ShutDownsudo shutdown timesudo shutdown -r NOWsudo shutdown -c time
  24. 24. Copy Paste : cp cp <file1> <file2> <dest> cp -r dir/* new-directory
  25. 25. Move + Rename : mvmv path/file new-path/new-namemv -r dir/* new-directory
  26. 26. TerminalUser @ computer-nameUser @ computer-name
  27. 27. TerminalUser @ computer-nameUser @ computer-name
  28. 28. TerminalUser@computer-name:~
  29. 29. TerminalUser@computer-nameUser@computer-name
  30. 30. Search Toolfind <dest> -name file-name
  31. 31. Linux files DBLets update linux files data base : sudo updatedb locate file-name
  32. 32. Package Management System >> Administration >> Synaptic Package Manager. sudo apt-get install <pckg>
  33. 33. Process managementSystem >> Administration >> System Monitor. ps aux topProcess termination: kill p-id pkill p-name kill -9 p-id killall p-id xkill
  34. 34. Launcher Lets create my buttons... gksudo firefox
  35. 35. Compression..* Create .tar.gz compressed file:1. Create .tar file: $ tar -cvf new_name.tar folder_or_file2.Create .gz file: $ gzip new_name.tar* Extract from .tar.gz compressed file:1. Create .tar file: $ gunzip new_name.tar.gz2.Create .gz file: $ tar -xvf new_name.tar
  36. 36. Linux Variables$ echo $PATH$ echo $USER$ echo $SHELL

×