Since the project project is using a Linux server, more Linux commands are used to record the commands commonly used in CentOS.
1. Three modes of VIM
2, decompression related
3. User-related
4. File related
5. Various view commands
1. Three modes of VIM
VI File name//command line mode, enter the file
Enter I//insert mode to edit the file
Click ESC, enter colon//Bottom line mode, enter Wq, save and exit; q! Do not save exit
2, decompression related
XXX.tar.gz Decompression: TAR-ZXVF XXX.tar.gz
Xxx.tar for decompression: TAR-XVF Xxx.tar
Xxx.zip for decompression: Unzip Xxx.zip
3. User-related
useradd New//Create new user
password new//Set password for new
su New//Switch to new this user
Password//change password for current user
4. File related
mkdir New//Create a folder with the name new
Touch New/new01.txt//New file under folder is New01.txt
chmod 755 New01.txt//Authorized all user access rights
CP Source path/File destination path///copy source file to destination path
SCP Source server/File destination server/File//server replication
Rm-rf folder or file//do not prompt and delete
MV Source path/File destination path/File//Move source file to destination path
MV filename. txt file name 1.txt//modify file name
5. Various view commands
Df-lh //view disk information
Lsb_release-a &NBS P //View system version information
Free &NBSP ; , &NB Sp //view memory information
Top & nbsp , &NB Sp //view occupy resource top resource process
Netstat-anpl|grep Service//View service port number
PS-EF|GREP Service Name//See if the service is installed
Ps-aux | grep Service//Check whether the service is running
NETSTAT-TULNP//View the ports on which the listening state is turned on
Netstat-anp|grep port number//view ports usage
tail-f filename// will display the last content of filename on the screen
Linux Common commands