No classification PS1 command name usage and Parameter Function Annotation
1. File Management # ls-A lists all files in the current directory, including. hidden File Management in the header # ls LS-l or ll list detailed file information under the current directory file management # PWD view the absolute path of the current directory by file management # CD .. back to the upper-level directory file management of the current directory # CD-back to the last directory file management # CD ~ Or CD back to the current user's home directory file management # CD ~ The user name is returned to the specified user's home directory.
2. File Management # create a directory file management by mkdir directory name # mkdir-P recursively create some nested directory file management # rmdir empty directory name delete an empty directory
3. File Management # rm RM file name delete one file or multiple file management # rm Rm-RF non-empty directory name recursively delete everything in a non-empty directory, without the mention of-F
4. File Management # view the file content on a single screen with Cat file names
5. File Management # View File Content by page for more file names
6. File Management # The file content can be viewed on Controllable pages with less-than file names
7 file management # grep character file names view part of the file content based on character matching
8. File Management # Move the files under the music video path/file path to the absolute path \ file management # change the name of the music video file name in the current directory \\
9 file management # cp CP/path/file./move files under absolute path to the current directory
10 file management # Find find path-name "string" to find the files and directories that match the string in the path
11 file management # ln Source File Link name creates a hard link to the source file of the current directory
Ln/home/test/usr/test1 create a hard link for/home/test under/usr
12 file management # ln-s a B create the symbolic link B of A in the current directory
13 file management # Touch touch file1 file2 create two empty files
14 disk management # DF is used to report the total capacity, usage, and remaining capacity of the file system.
15 disk management # Du-B/home view the current/home directory capacity (K) and sub-directory capacity (k ).
16 disk management # fdisk-l view system partition information
17 disk management # fdisk/dev/SDB is used to partition a new SCSI hard disk.
18 disk management # mkfs. ext3 mkfs. ext3/dev/sdb1 is the first primary partition of the first SCSI hard disk and formatted as an ext3 file system.
Mkfs. ext2 mkfs. ext2/dev/sdb2 format to ext2 File System
19 disk management # mount Mount-T file system type device path access path disk management # file system type file system drive file system vfat FAT file system (Windows) mount the optical drive # Mount-T iso9660/dev/CDROM/mnt/CDROM Mount fat # Mount-T vfat/dev/hda5/mnt/CDROM mount the fifth logical partition of the first ide
17 disk management # umount/mnt/CDROM unmount/mnt/CDROM is empty
18 file permissions # chmod U + s file adds special permissions to the file owner
Chmod g + R file: Add read permission to the file group
Chmod o + W file adds write permission to other users of File
Chmod A-X file: all users of the file minus the execution permission.
Chmod 765 The owner of file is set to full permission, and the owner group is set to read/write permission. Other users have read and execute permissions.
19 File Permission # chown root/home change/home owner to root user
20 file permissions # change the/home group to the root group for chgrp root/home
21 print management # RedHat-config-printer-tui enter the printer installation Interface
22 print management # LP Lp-D hptr file print file to the hptr printer
23 print management # lpq-P printer name view printer status
24 print management # lprm-P printer name a delete print jobs in the printer
25 print management # disable-R "Changing paper" hptr disables the printer and prompts the cause
26 print management # enable hptr re-enable disabled
27 user management # useradd create a new user
28 user management # groupadd group name to create a new group
29 user management # passwd user name creates a password for the user
30 user management # passwd-D passwd-d the user name can also be logged in if you delete the User Password
31 user management # passwd-l user name locking account and password
32 user management # passwd-u user name unlock account password
33 user management # passwd-s user name query account and password
34. User Management # usermod-l new username old username changed to user name
35 user management # usermod-l usermod-L to lock the user name to lock the User Login
36 user management # usermod-u unlock user name unlock User Login
37 user management # usermod-u 501 Change User uid
38 user management # userdel-r user name delete all user information
39 user management # groupmod-N new username old username rename Group
40 user management # groupmod-G 501 Group Name Change Group GID
41 user management # groupdel the group name should first delete its users to delete the group
42 user management # gpasswd-A gpasswd-a username group name is added to the group
43 user management # ID user name query user information
44 software management # rpm-Qa | less query installed RPM
45 software management # rpm-Qa | grep FTP query specified rpm
46 software management # Check whether the RPM package has been installed by rpm-Q
47 software management # rpm-Q telnet-Server View telnet server package
48 software management # rpm-Qi software package name View Software Description
49 software management # query the file list of a software package by rpm-QL package name
50 software management # rpm-QF package name query the package to which a file belongs
51 software management # Full name of rpm-QP Software Package Query Information of uninstalled software packages
52 software management # delete a specific software package by rpm-e rpm-E Software Package name
53 software management # Full name upgrade of rpm-u rpm-uvh software package and display the process
54 software management # Full name of rpm-IVH software package installation package and display process
55 software management # rpm-V software package name verification package size and type
56 software management # tar-C create package-x release package-V display command process-Z represents the compressed package
57 software management # tar-CF tar-CVF benet.tar/home/Benet package the/home/Benet directory
58 software management # tar-CZF tar-zcvf benet.tar.gz/mnt package and compress the Directory
59 software management # tar-TF benet.tar: List of non-compressed files
60 software management # tar-tzf tar-TF benet.tar.gz view the file list of the compressed package
61 software management # tar-XF benet.tar non-compressed package file recovery
62 software management # extract and restore the files in the tar-zxvf benet.tar.gz compressed package
63 software management # tar-jxvf benet.tar.bz2
64 software management # diff file1 file2> patch name. Patch generates patch files for new and old files
65 software management # diff file1 file2 compares the differences between the two files
66 software management # patch file patch name. Patch patch
67 software management #./configure-Prefix =/usr/local/pre-compilation Configuration
68 software management # Make Compilation
69 software management # make install the compiled source code package
70 boot management # reboot init 6 restart Linux
71 start management # halt init 0 shutdown-H now disable Linux
72 start management # runlevel display system running level
73 startup management # init [0123456] changes the system running level, 7 types
74 start management # chkconfig -- list [service name] to view the service status
75 startup management # chkconfig -- level <running level> <service name> On | off | set sets the startup status of the service.
76 startup management # chkconfig <service name> On | off | set the startup status of a non-independent service
77 Process Management # top dynamic PS-Aux static process tree pstree view system processes
78 Process Management #ProgramName & background running program
79 Process Management # FG transfers the processes running in the background back to the foreground
80 Process Management # BG transfers the processes running on the foreground to the background
81 Process Management # renice + 1 180 Add the priority of process No. 180 to 1
82 Process Management # Kill kill PID to terminate a PID Process
83 Process Management # at 5 + 3 days
/Bin/ls specify to execute/bin/ls at PM three days later
84 Process Management # crontab-e uses VI to edit Automatic periodic tasks
85 Process Management # crontab-l view Automatic periodic tasks
86 Process Management # crontab-r Delete Automatic periodic tasks
87 Process Management # crond service crond <START | stop | restart | status>
Enable Automatic periodic service crond immediately <START | stop | restart | status>
Implement Disk Quota (Note: Create/home partition when installing Linux)
Objective: To implement a disk quota of 5 kb for soft limit and 10 kb for Zhao in the/home directory.
Steps:
1. Modify the line containing/home, # vi/etc/fstab, and change it to defaults and usrquota. That is, the usrquota item is added. Save and exit.
2. Uninstall the/home directory # umount/home
3. Mount/home directory # Mount/home
4. Add User Zhao # useradd Zhao
5. Change the password # passwd Zhao
6. Generate quota information about the/home directory # quotacheck-cmug/home
# Quotacheck-vu/home
7. View information of all users # repquota-Au
8. Set the quota # edquota-u Zhao
Change soft and hard to 5 and 10 respectively.
9. Save and exit # WQ!
10. modification time # edquota-T
11. # WQ!
12. Enable the disk quota function on/home # quotaon/home
13. query the quota # quota-u Zhao
14. Verify the quota # Su-zhao
$ Touch myfile