Ubuntu's Terminal
1. Recall Method
Windows key +t
2. Terminal Display content
3. View the absolute path of the current directory--pwd command
EG1:
EG2:
Linux is strictly case sensitive
4. Change/Enter directory--CD command
(1) CD/: Go to the root directory
(2) CD directory name: Enter the specified directory
(3) CD (or: cd ~): Enter the current user's home directory
Note: Common Directory representation methods
/: root directory
.: Current directory or this directory
.. : The parent directory of the current directory
/directory Name 1: directory name under the root directory 1
/directory name 1//directory Name 2: Directory Name 1 under the root directory 2
(Relative path: absolute path without root directory: with Root)
5. Display directory Contents--ls command
(1) LS: lists all content in the current directory
(2) LS directory name 1: List all contents under directory name 1
6. Create a directory--mkdir command
(1) mkdir directory Name 1: Create directory name 1 under current directory
(2) mkdir directory name 1/directory Name 2: Create directory name 1 under specified directory name 2
7. Copy File/directory--CP command
(1) CP directory name 1/file 1 directory 2: The directory 1 under the file 1 is copied into the directory 2
(2) Cp-r directory name 1 directory 2: Copy directory 1 into Directory 2
8. Delete File/directory--RM command
(1) RM file name 1: Delete file 1
(2) Rm-r directory name 1: Delete directory 1
RM-RF Directory 2: Delete non-empty directory 2
9. Move File/change file name--MV command
(1) MV file name 1 directory 1: Move the file 1 to directory 1
(2) MV file name 1 filename 2: Rename filename 1 to file name 2
Little Tricks
(1) Use the TAB key to complete the command
(2) Double-click tab to view command prompt 2
Ubuntu Terminal Introduction