How to Use the Linux man command
I. Description
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.
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]
Ii. Usage:
MAN + number + command/Function
For example, MAN 2 exit can be used to find related commands and functions.
What does the above mean? The numbers are explained as follows:
1. Standard Commands (standard command)
2. System CILS (system call)
3. library functions)
4. Special devices (device description)
5. file formats (File Format)
6. games and toys (games and entertainment)
7. Miscellaneous (Miscellaneous)
8. administrative commands (Administrator command)
9 others (Linux-specific) are used to store documents of kernel routines.
N new documents may need to be moved to a more appropriate area.
O old documents may be retained for a period of time.
L local documents related to the specific system.
For example, if we enter man ls, "ls (1)" is displayed in the top left corner. Here, "ls" indicates the name of the manual, and "(1) "indicates that the Manual is located in the first chapter. Similarly, we enter" Man ifconfig ", which will display" ifconfig (8) "in the upper left corner )". You can also enter the command "MAN [chapter number] manual name ".
Man searches by chapter number, for example:
Man sleep
Only the manual of the sleep command is displayed. To view the library function sleep, enter:
MAN 3 sleep