1.man命令的用法
man ->>manual ##man是手册的缩写
man man ##查看man命令的帮助
man passwd ##查看passwd命令的帮助
man的级别
1 ##系统命令
2 ##系统接口
3 ##函数库
4 ##特殊文件,比如设备文件
5 ##文件
6 ##游戏
7 ##系统的软件包
8 ##系统管理命令
9 ##内核
example
man 5 passwd ##查看/etc/passwd文件的帮助
man 1 passwd ##查看passwd命令的帮助,1可省略
2.1 选项帮助:命令 --help
#获取外部命令选项的帮助
cd --help
#获取cd外部命令的帮助
2.2 shell内部帮助命令:help shell 内部命令
#获取shell内部命令的帮助
例子:1. whereis cd
#确定是否是shell内部命令
2. help cd
#获取内部命令帮助
3 详细命令帮助:info
info 命令
-回车 进入子帮助页面
-u 进入上层页面
-n 进入下一个帮助小节
-p 进入上一个帮助小节
-q 退出
4.whatis:用于查询一个命令执行什么功能,并将查询结果打印到终端上。
例:
[root@localhost ~]# whatis ls
(1) - list directory contents ls
(1p) - list directory contents
[root@localhost ~]# whatis cp cp
(1) - copy files and directories cp
(1p) - copy files
[root@localhost ~]# whatis chown chown
(1) - change file owner and group chown
(1p) - change the file ownership chown
(2) - change ownership of a file chown
(3p) - change owner and group of a file