First group: User management
Add user Useradd [] User name
After adding a user, the user folder is automatically generated at/home
Delete User Useradl [-r] User name
When the user is deleted, the/home user folder is automatically deleted through the [-r] Option
Modify user password passwd [] User name
Add user group Groupadd [] User group
Switch User Su-user name
If the [-] option is selected, switch the environment variables together
Delete user group Groupdel user group name
Second group: File and Directory class commands
View Catalog ls or ls/home/
Show hidden files Ls-a/home/
Show more info ll or ll-la/home/
Change the working directory CD directory name
Cd..
Cd.. /..
Return to previous catalog CD-
Copy files/directories CP [] source file Destination file
Cp[-r] Original Folder destination folder
Move/Rename Mv/home/test/home/test_01
Mv/home/test/temp
Delete File/directory RM [] File name
RM [-R] Folder
Force delete RM [-f] File name
Change file access permissions such as:
chmod u+w hello.c
chmod g+r test.c
chmod 777 TEST.c
Create directory mkdir [] directory name
For example, with the [-p] option, Mkdir-p/home/dir1/dir2/dir3. () if Dir1 and dir2 do not exist, they will be created automatically.
View Directory Size Du/tmp
View current path pwd
Group Three: Compressed packaging class commands
Compress extract gzip [] File name
Example: gzip/home/test.c compressed, the source file hours
gzip-d/home/test.c Extract a file
Compression decompression bZIP [] File name
Example: bzip/home/test.c compression
bzip-d/home/test.c Decompression
tar [] Directory/File
For example: Tar cvf temp.tar/tmp
Tar xvf Temp.tar
Tar cvzf temp.tar.gz/temp @temp as source file
Tar xvzf temp.tar.gz
Group Fourth: Disk Management class Commands
Loading the disc mount/dev/cdrom/mnt
Unmount the disc umount/mnt
View Disk DF []
Create a file Touch file name
File Link ln file name
For example: Create a soft connection ln-s/home/old_file/slink
Wear a hard link ln/home/old_file/hlink
Group Fifth: Find class commands
Find files/directories find [] files/directories
Example: find/root/-name Install.log
Find string grep "string" path []
For example: grep "Hello"./-rn @ list Results
grep "xml"/root-rn
Group Sixth: Process commands
View process: PS aux
Kill process: Kill [Process number]
View Memory: Free
CPU Share: Top
Group Seventh: Other Commands
Software management rpm [IVH] File name
(RPM packages are generally included in the package directory of the system CD-ROM)
View installed software: RPM-QA
Uninstalling installed software: RPM-E package name
Pipeline Operations Command 1 | Command 2
Example: Rmp-qa | grep tar
View Help man [command name]
Example: Man find
Shut down the system shutdown now
This article is from the "Home Life" blog, please be sure to keep this source http://fdliang.blog.51cto.com/9889796/1698454
Lesson6--linux command Explanation