System:
Sync |
Synchronizing data from memory to the hard disk (shutdown ago) |
Shutdown-h Now Shutdown-r Now shutdown-h xxx |
turn off the machine now Restart now xxx minutes after shutting down the machine |
Reboot |
Restart |
Vi/vim Editor:
Vi/vim xxx |
Edit XXX File |
I (General mode) a o |
Insert before cursor Insert after cursor Insert Next line |
ESC (edit mode) |
Edit mode returns to General mode |
DD (General mode) d Digital D yy y digit y u p DW yw x x shift+g shift+g+1 shift+g+ number shift+^ shift+$ |
Delete the line where the cursor is located Delete (number) line after cursor Copy the line where the cursor is located Copy the line after the cursor (number) Revoke Paste Delete a word Copy a word del BACKSPACE move to end of page move to top of page move to (number) line move to the beginning of the line move to end of line |
: (General mode) |
Enter instruction mode |
: Set nu (instruction mode) : Set Nonu |
Show Line Numbers Hide Line Numbers |
W Q ! %s/old character/new character/g |
Save Exit Mandatory Execution Replace |
/ N Shift+n |
Find Find the next Find Previous |
User/Group:
Useradd |
Add user |
Userdel-r |
Delete command |
whoami/who am I |
View Current User |
Id |
Whether the user exists |
passwd |
New User Settings password |
USERMOD-G User Group user name |
To join a user to a user group |
Su-user name |
Switch users |
Groupadd |
Add Group |
Groupdel |
Delete a group |
Groupmod-n New group name old group name |
Renamed |
file directory: Create directory delete directory
pwd |
show current directory |
ls-l |
show directory contents |
mkdir rmdir | Td>
CD directory CD: CD ~ CD/ |
|
CP  |
copy file or directory |
rm-rf |
recursively delete contents in directory |
Search:
Find |
Find a file or directory |
Grep |
The lines within the file that match the search string |
Process:
Ps-aux |
Show All Processes |
Kill-9 Process Number |
Force Kill Process |
Netstat-anp |
Display Network statistics |
Compression/Decompression:
gzip gunzip |
Compact. GZ unzip. GZ |
zip unzip |
compress. zip unzip. zip |
TAR-ZCVF xxx.tar.gz< /span>tar-zxvf xxx.tar.gz -c generate. Tar package files -v Show details -f Specify the compressed file name -z packaging and compressing the -x unpacking. tar file |
compression tar.gz unzip tar.gz |
file permissions:
chmod three-digit |
Modify File/directory permissions |
CHGRP Final Destination Group files/directories |
Modify a file/directory to belong to a group |
Chown End user is modified file chown End User: Modified file for landing user group |
Modify File/directory owner |
Umask |
View default Authorization Rules |
RPM:
Rpm-qa |
To query all installed RPM packages |
RPM-IVH RMP Package Full path name |
Installing the RMP Package |
RPM-E RMP Package Full path name |
Uninstalling the RMP Package |
Linux Common commands