Linux common commands

1. The cd command is a directory switching command
1.cd/ enters the system root directory
2.cd~ enters the user directory
3.cd file name enters the current file directory
4.cd .. returns to the previous directory
5.cd ../.. Return to the previous directory of the previous level
6.cd/directory/directory Enter the specified directory according to the absolute path
(. represents the current directory.. represents the previous directory)

2. View the file list
1.ls command to view the file list 2.ls-l list to display file information

3. View the current path of the file pwd

4. View history command history

5. Upload and download
1. Upload rz and then select the windows file to upload to the current directory
2. The name of the sz xxx file to download

Six. As of the current command, restart ctrl+c stop

Seven. Create a file
1.mkdir Create a folder  
2.touch file name. Suffix Create a file with a specified suffix

Eight. File copy paste and cut command
1.rm file name delete to confirm input y
2.rm -f file name
3.rm -rf folder name delete a folder

9. Operation file
1.vi file name Open file
2.i/insert Enter edit mode
3.esc key Exit edit mode
4.:wq Execute save and exit

10. About save and exit
1 :w Save
2 :w! Force save
3 :q exit
4 :q! force exit
5 :wq! force save and exit

Eleven. Compression and decompression commands
zip The file name you want to compress into.zip Function: Compress into a .zip file
Decompression:
tar -xvf xxx.tat.gz
unzip xxx.zip 

12. Check the memory status
1. free - h check the memory status
2. kill -9 for id to kill the process

Supongo que te gusta

Origin blog.csdn.net/weixin_53818758/article/details/126121386
Recomendado
Clasificación