Common commands (1) 1. System-related commands
| Su |
Switch users |
| Hostname |
View Host Name |
| W.H.O. |
View users logged on to the system |
| WhoAmI |
Confirm your identity |
| History |
View the history of running commands |
| Ifconfig |
View network devices |
| Ping |
Check the connectivity of the network |
| Kill |
Kill process (kill-9 process number-----force kill process) |
| Date |
Show Date |
| ------Date-s Time or date |
Modification time |
2. Directory Operations Command
| Pwd |
View current Path |
| Main |
Bring up the command help manual |
| Cd |
Switch directories |
| CD./ |
Current directory |
| Cd.. / |
Switch to Parent directory |
| CD/ |
Switch to the root directory |
| CD ~ |
Switch to User home directory |
| CD Directory Name |
Switch relative to the path |
| CD/directory Name |
Toggle under Absolute Path |
| Mkdir |
Create a Directory |
| mkdir Directory Name-P |
Create a directory with paths |
| RmDir |
Delete Empty Directory |
| Rm-rf |
Force Delete |
Relative path: path absolute path starting from the current directory: path starting at root 3. File Operations Command
| Ls |
View directories and files |
| Ls-l |
Show file familiarity |
| Ls-a |
Show all files (including hidden files) |
| Cp |
Copy command |
| Cp-r |
Copy all directories and files under directories and directories |
| CP file name/directory destination Address |
Copy file/directory to destination address |
| CP a file B file |
Copy a, and rename the A file to B |
| Mv |
Move command |
| MV file name/directory destination Directory |
Move File/directory to destination directory |
| MV A file B file |
Move a, and rename the A file to B |
| RM File: / |
Move files to the parent directory |
|
|
4. File editing commands
| Vi |
|
| VI a.txt |
Call Method: |
| I |
Enter edit state |
| Esc |
Exit Edit State |
| : Q |
Do not edit exit |
| : q! |
Force exit |
| : Wq |
Save exit |
| /query Content |
Search |
| G |
Navigate to First line |
| G |
Navigate to Tail Line |
Linux common commands (1)