DESCRIPTION man is the system's manual pager. Each page argument given to man is normally the name of a program, utility or function. The manual page associated with each of these arguments is then found and displayed. A section, if pro‐ vided, will direct man to look only in that section of the manual. The default action is to search in all of the available sections following a pre-defined order ("1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7" by default, unless over‐ ridden by the SECTION directive in /etc/manpath.config), and to show only the first page found, even if page exists in several sections.
The table below shows the section numbers of the manual followed by the types of pages they contain.
1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games Manual page man(1) line 1 (press h for help or q to quit)
1 2 3
root@atompi:~# man -f man man (1) - an interface to the on-line reference manuals man (7) - macros to format man pages
1 2 3
root@atompi:~# whatis man man (1) - an interface to the on-line reference manuals man (7) - macros to format man pages
1 2 3 4
man -k list apropos -e list # 以上两个命令都会输出很多匹配 `list` 的结果，输出的结果可能不全是想要的，但是，当你一时忘记了命令的全名，不妨试一试，说不定看到提示，你就想起来了呢。 # man -k list | grep list == apropos -e list
root@atompi:~# man 5 passwd PASSWD(5) File Formats and Conversions PASSWD(5)
NAME passwd - the password file
DESCRIPTION /etc/passwd contains one line for each user account, with seven fields delimited by colons (“:”). These fields are:
· login name
· optional encrypted password
· numerical user ID
· numerical group ID
· user name or comment field
· user home directory
· optional user command interpreter
The encrypted password field may be blank, in which case no password is required to authenticate as the specified login name. However, some applications which read the /etc/passwd file may decide not to permit any access at all if the password field is blank. If the password field is a lower-case “x”, then the encrypted password is actually stored in the shadow(5) file instead; there must be a corresponding line in the /etc/shadow file, or else the user account is invalid. If the password field is any other string, then it will be treated as an encrypted password, as specified by crypt(3).
The comment field is used by various system utilities, such as finger(1).
The home directory field provides the name of the initial working directory. The login program uses this information to set the value of the $HOME environmental variable.
The command interpreter field provides the name of the user's command language interpreter, or the name of the Manual page passwd(5) line 1 (press h for help or q to quit)