Advertisement
v1ral_ITS

Ubuntu basics

May 2nd, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.93 KB | None | 0 0
  1.  
  2. .
  3.  
  4. Basic Ubuntu Commands for Beginner
  5. 1. sudo
  6. sudo (SuperUser DO) Linux command  allows you to run programs or other commands with administrative privileges like “Run as administrator” in Windows. This is useful when, for example, you need to modify files in a directory that your user wouldn’t normally have access to.
  7.  
  8. 2. cd
  9. cd (change director”) Linux command also known as chdir used to change the current working directory. You can use full paths to folders or simply the name of a folder within the directory you are currently working. Some common uses are:
  10.  
  11. cd / – Takes you to the root directory.
  12. cd .. – Takes you up one directory level.
  13. cd – – Takes you to the previous directory.
  14. 3. pwd
  15. pwd (print working directory) Ubuntu command displays the full pathname of the current working directory.
  16.  
  17. 4. ls
  18. ls (list) command lists all files and folders in your current working directory. You can also specify paths to other directories if you want to view their contents.
  19.  
  20. 5. cp
  21. cp (copy) Linux command allows you to copy a file. You should specify both the file you want copied and the location you want it copied to – for example, cp sns /home/myfiles would copy the file “sns” to the directory “/home/myfiles”.
  22.  
  23. 6. mv
  24. mv (move) command allows you to move files. You can also rename files by moving them to the directory they are currently in, but under a new name. The usage is the same as cpfor example mv sns /home/myfiles would move the file “sns” to the directory “/home/myfiles”.
  25.  
  26. 7. rm
  27. rm (remove) command removes the specified file.
  28.  
  29. rmdir (“remove directory”) – Removes an empty directory.
  30. rm -r (“remove recursively”) – Removes a directory along with its content.
  31. 8. mkdir
  32. mkdir (make directory) command allows you to create a new directory. You can specify where you want the directory created – if you do not do so, it will be created in your current working directory.
  33.  
  34. 9. history
  35. history command displays all of your previous commands up to the history limit.
  36.  
  37. Also Read : Microsoft’s Windows Subsystem For Linux – More Details About How Bash On Windows 10 Works
  38.  
  39. 10. df
  40. df (display filesystem) command displays information about the disk space usage of all mounted filesystems.
  41.  
  42. 11. du
  43. du (directory usage) command displays the size of a directory and all of its subdirectories.
  44.  
  45. 12. free
  46. free – Displays the amount of free space available on the system.
  47.  
  48. 13. uname -a
  49. uname -a – Provides a wide range of basic information about the system.
  50.  
  51. 14. top
  52. top – Displays the processes using the most system resources at any given time. “q” can be used to exit.
  53.  
  54. 15. man
  55. man command displays a “manual page”. Manual pages are usually very detailed, and it’s recommended that you read the man pages for any command you are unfamiliar with. Some uses are :
  56.  
  57. man man – Provides information about the manual itself.
  58. man intro – Displays a brief introduction to Linux commands.
  59. 16. info
  60. Similar to man, but often provides more detailed or precise information.
  61.  
  62. 17. <command name> -h or <command name>help
  63. This command is a third alternative to get help. While not as detailed as the info or man pages, this will provide a quick overview of the command and its uses.
  64.  
  65. Also Read : How To Uninstall Linux Or Windows From Dual Boot System
  66.  
  67. Ubuntu Terminal Shortcuts
  68. The Up and Down arrow keys can be used to scroll through your command history, allowing you to quickly execute the same command multiple times.
  69. The Tab key can be used to complete the command you are typing. If more than one command is possible, you can press it multiple times to scroll through the possible completions. If a very wide number of commands are possible, it can output a list of all possible completions.
  70. Ctrl+r allows you to search your history for commands matching what you have typed.
  71. Also Read : Secure-K, a portable Linux-based encrypted OS to protect your privacy and data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement