查看帮助
2025/9/16小于 1 分钟
查看帮助
man
[!quote]
man - an interface to the on-line reference manuals
示例:
man ls
man 2 ls通过 man man 查看如何使用man来获取帮助。
按功能、用途 对命令进行了划分,使用 page 参数查看指定分类下的命令。
page 及其 section 含义:
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
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]如果没有提供page 参数,那么显示按预设的section顺序找到的首个该命令的帮助。如 man open 显示 page 1 下的openvt 帮助。如果要查看系统调用function open,需要显式指定 section,man 2 open
| page | command | name |
|---|---|---|
| 1 | open | openvt - start a program on a new virtual terminal (VT). |
| 2 | open | open, openat, creat - open and possibly create a file |