man 命令
获取指定命令的帮助
[root@wangteng ~]# man ls
LS(1) User Commands LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
do not ignore entries starting with .
man的级别
123456789
查看命令拥有哪个级别的帮助
man -f 命令
相当于 whatis 命令
[root@wangteng ~]# man -f passwd
passwd (1) - update user's authentication tokens
passwd (5) - password file
passwd [sslpasswd] (1ssl) - compute password hashes
[root@wangteng ~]# man 5 passwd
man -k 命令
查看和命令相关的所有帮助
相当于 apropos命令
[root@wangteng ~]# man -k passwd
chpasswd (8) - update passwords in batch mode
fgetpwent_r [getpwent_r] (3) - get passwd file entry reentrantly
passwd (1) - update user's authentication tokens
passwd (5) - password file
命令 --help
查看命令帮助
[root@wangteng ~]# passwd --help
用法: passwd [选项...] <帐号名称>
-k, --keep-tokens 保持身份验证令牌不过期
-d, --delete 删除已命名帐号的密码(只有根用户才能进行此操作)
shell 内部命令帮助
help shell 内部命令
例如:
whereis cd
确定是否是shell内部命令(找不到执行文件就是内部命令)
help cd
获取内部命令帮助 (只能获取内部命令帮助)
info 详细内容帮助
info 命令