Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Common Linux commands:
- * Use ("/quotation mark) before and after filename or directory name if there space is added *
- To make a directory:
- mkdir (Stands for make directory)
- e.g.: mkdir [DIRECTORY_NAME]
- To change or navigate the directory:
- cd (Stands for change directory)
- e.g.: cd [DIRECTORY_NAME]
- To go back to the previous directory:
- cd..
- To list the content of the current directory:
- ls (Stands for list)
- To list the content of the current directory (In detail):
- ls -l
- To rename a file or a directory:
- rename [OLD_FILENAME.FILETYPE_EXTENSION] [NEW_FILENAME.FILETYPE_EXTENSION]
- To remove a file or a directory:
- rm (Stands for remove)
- e.g.: rm [FILENAME_OR_DIRECTORY_NAME]
- To present or open any text type or text-contained file:
- cat [FILENAME.FILETYPE_EXTENSION_OR_PATH]
- To edit or open any text type or text-contained file:
- nano [FILENAME.FILETYPE_EXTENSION_OR_PATH]
- Some nano commands:
- 1) CTRL+O (For saving/writing out)
- 2) Enter key (To save the filename with their filetype extension)
- 3) CTRL+X (To exit)
- To copy any file or directory:
- cp (Stands for copy)
- e.g.: cp [FILENAME.FILETYPE_EXTENSION_OR_WITH_OLD_PATH] [NEW_PATH_OR_DESTINATION]
- To move/cut any file or directory:
- mv (Stands for move)
- e.g.: mv [FILENAME.FILETYPE_EXTENSION_OR_WITH_OLD_PATH] [NEW_PATH_OR_DESTINATION]
- To see entire directories as tree:
- cd /
- tree
- To clear the terminal screen:
- clear
- To exit or exit from the root/admin user mode:
- exit
- To enter into the root/admin user mode:
- sudo su
- Then enter the password if there is
- To present current date:
- date
- To present current time:
- time
- To execute any program file:
- ./[FILENAME.FILETYPE_EXTENSION_OR_PATH]
- To change password in Linux:
- sudo passwd
- 1) Enter your old password and press enter
- 2) Type a new password and press enter (minimum 8 letters or 8 numbers or 8 special characters or a sequence of that characters are allowed)
- 3) Retype new password and press enter
- 4) Then reboot your system to make changes everywhere
- To reboot system:
- reboot
- To shutdown:
- poweroff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement