# 命令--3.Linux帮助文档
# man
# man man
ANUAL SECTIONS
The standard sections of the manual include:
1 User Commands 所有用户使用命令
2 System Calls 系统调用
3 C Library Functions 函数库
4 Devices and Special Files 设备与特殊文件
5 File Formats and Conventions 文档格式说明
6 Games et. Al. 游戏
7 Miscellanea 杂项
8 System Administration tools and Deamons 系统管理员与程序用户相关
一般情况是不需要使用章节号,例如:
# man 1 ls
# man ls
# man useradd
# man setfacl (/EXAMPLES)
# man -f passwd 列出所有章节中的passwd手册
# man 1 passwd passwd命令的帮助
# man 5 passwd 用户配置文件的帮助
# man -a passwd 在所有章节中查找
# man -k passwd 以关键字导出man page
程序猿手册 man 23467
管理员手册 man 158
man命令的快捷键
快捷键 | 作用 |
---|---|
上箭头 | 向上移动一行 |
下箭头 | 向下移动一行 |
PgUp | 向上翻一页 |
PgDn | 向下翻一页 |
g | 移动到第一页 |
G | 移动到最后一页 |
q | 退出 |
/字符串 | 从当前页向下搜索字符串 |
?字符串 | 从当前页向上搜索字符串 |
n | 当搜索字符串时,可以使用n键找到下一个字符串 |
N | 当搜索字符串时,使用N键反向查询字符串。 也就是说,如果使用“/字符串”方式搜索,则N键表示向上搜索字符串; 如果使用“?字符串”方式搜索,则N键表示向下搜索字符串 |
man命令的帮助级别(了解)
级别 | 作用 |
---|---|
1 | 普通用户可以执行的系统命令和可执行文件的帮助 |
2 | 内核可以调用的函数和工具的帮助 |
3 | C语言函数的帮助 |
4 | 设备和特殊文件的帮助 |
5 | 配置文件的帮助 |
6 | 游戏的帮助(个人版的Linux中是有游戏的) |
7 | 杂项的帮助 |
8 | 超级用户可以执行的系统命令的帮助 |
9 | 内核的帮助 |
man -f
命令或whatis
命令
#查看命令拥有哪个级别的帮助
[root@xiaoshaozi ~]# whatis passwd
passwd (1) - update user's authentication tokens
sslpasswd (1ssl) - compute password hashes
[root@xiaoshaozi ~]# man -f passwd
passwd (1) - update user's authentication tokens
sslpasswd (1ssl) - compute password hashes
了解
man -k
命令或apropos
命令#查看和命令相关的所有帮助
# info
info命令的帮助信息是一套完整的资料,每个单独命令的帮助信息只是这套完整资料中的某一个小章节。
# help
help只能查看内置命令
type 命令
判断是否是内置命令
help 命令
查看内部命令命令 --help
查看外部命令的帮助
cp --help
help cd
# --help选项
绝大多数命令都可以使用“--help”选项来查看帮助,这也是一种获取帮助的方法。
[root@xiaoshaozi ~]# ls --help
这种方法非常简单,输出的帮助信息基本上是man命令的信息简要版。
# 相关官方文档
http://httpd.apache.org/docs/2.4/
http://nginx.org/
http://tengine.taobao.org/nginx_docs/cn/docs/
https://www.zabbix.com/documentation/3.4/zh/manual
https://puppet.com/docs
其他社区
https://www.linuxidc.com/
等等