The Linux man command is an important Linux Command that beginners must master. It can be used to solve a variety of issues that will not be used during learning, different usage methods of each command can be found here. This section describes how to use it.
In Linux shell, I often use man commands to view how to use unfamiliar commands. When programming in shell, I found some library functions in c and c ++ are unclear, and I went to the Internet to search for them. Accidentally, I found that man can also be used to query some function definitions and usage methods in the system library file.
Man is the abbreviation of manual. It is used to view various reference manuals in the system. However, the manual page is divided into several parts, as shown below:
1 Executable programs or shell commands
2 System CILS (functions provided by the kernel)
3 Library CILS (functions within program libraries)
4 Special files (usually found in/dev)
5 File formats and conventions eg/etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man (7), groff (7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
Enter man + number + command/function in shell to find related commands and functions. If no number is added, the man command searches for related commands and functions from the manual with a smaller number by default.
For example, if you want to find the rand () function in the c standard library, you can use man rand to obtain a manual of the rand command, which is used to generate a random number directly, this content is included in section 1 of the manual. If man 3 rand is used, you can get the rand () usage in the library function you want.
This section describes how to use the Linux man command.
- Analyze how to view and modify the Linux File Encoding
- Decrypts an important Linux system directory 1)
- Detailed analysis of Linux Server Memory
- Linux shell script BASICS (1)
- Security Configuration for Linux system security improvement