Basic Linux commands
1. chgrp, chown, and chmod (-R recursively modifies the files in the folder)
Chgrp: Modify the group to which the file belongs.
Chown: Specifies the user to which the file belongs.
Chmod: Modify file permissions r = 4, w = 2, x = 1 chmod 4 + 2 + 1 file if you do not know the file permissions, you can directly add permissions such as chmod a ± rwx (a represents all users, g Represents groups, o Represents other) file
Chmod a = rwx file is the same as the above-mentioned permission adding method
2. When a folder does not have the x permission, you cannot add a cd file. The file w permission can be added, modified, or deleted in the directory. The file r permission can be the ls File Permission.
3. mkdir-p test1/test2/test3/test4 added this-p prepare option to help you create multi-level directories. Otherwise, you cannot directly create multi-level directories. We recommend that you do not recommend-p to create directories, if the directory name is entered incorrectly, a directory with seven or eight slots will appear.
4. Create a directory named rwx -- x in mkdir-m 711 test2. If-m is not added, the system adds the default attribute.
5. rmdir test is used to delete an empty directory rmdir-p a/B/c. It is used to recursively delete an empty directory.
6. rm-r file recursive deletion plus-I ask whether to delete
7. The overall vim setting value is generally placed in the/etc/vimrc file. However, we do not recommend that you modify it! You can modify ~ /. Vimrc File
(The preset does not exist. Please create it manually !), Write the set value you want!
8. cp can be copied, and connection files can be established as shortcuts
9. Special file permissions: SUID, SGID, SBIT
When the "s" mark appears on the x permission of the file, it is called "Set UID" or "SUID ".
10. mount point: the mount point must be a directory, which is the entry to the file system. Therefore, it is not applicable to any file system, the file system must be mounted to a directory in the directory tree before it can be used.
11. Hard Link (Hard connection) points to the same inode Symbolic Link (Symbolic connection is equivalent to a shortcut in windows) ln-
12. partitioning, formatting, checking, and attaching a disk
13. Linux Decompression
14. The pipeline command only processes standard output and ignores standard error output.
Pipeline commands must be able to accept the data from the previous one as standard input for further processing.
15. lsblk lists information about all disks and partitions in the system.
16. blkid lists the UUID of the file system and Device
17. parted/dev/sda2 print list Disk Data
18. view the default environment variable: env export
19./etc/issue host login display/etc/issue.net terminal host login display/etc/motd login message
20. cut data is divided into cut-d ","-f 2 ---> cut-c 12-13 ---> words at the position of 12-13 are separated by rows
21. grep is used to analyze a row. If there is any line we need, we can take it out.
22. watch-n 1 uptime refresh every second to obtain the current system load
23. passwd-l user: Disable user logon to passwd-u user
24. cmd &> out.txt error message: the out.txt information is printed to the out.txt file.
25. Tips: commands related to c
26. wc-c wc-m is more than the actual wc-c wc-m
27. tr
Translate or delete characters
Tr [OPTION]... SET1 [SET2] set1 to set2