1. 使用 man 命令查看
栗子:
[root@Alibaba ~]# man cd
执行 man 命后的帮助信息简介:
帮助标题 | 功能说明 |
---|---|
NAME | 命令说明及介绍 |
SYNOPSIS | 基本使用语法 |
DESCRIPTION | 参数选项说明 |
man 帮助页面快捷键
快捷键 | 功能说明 |
---|---|
/string | 向下搜索 string 字符串 |
?string | 向上搜索 string 字符串 |
n,N | 当使用 "/" 或 "?" 搜索 字符串时,n 继续按相同方向查询,N 则按照反向查询。例子:/string 向下查找 string,输入 n 则继续向下查找 string,输入 N 则向上查找 string。?string 向上查找 string,输入 n 则继续向上查找,输入 N 则向下查找 string |
q | 结束本次 man 帮助 |
3.2. 使用 --help 参数查看
使用 "命令 --help" 可以查看简短的命令帮助信息.
[root@Alibaba ~]# mkdir --help
Usage: mkdir [OPTION]... DIRECTORY...
Create the DIRECTORY(ies), if they do not already exist.
Mandatory arguments to long options are mandatory for short options too.
- -m, --mode=MODE set file mode (as in chmod), not a=rwx - umask
- -p, --parents no error if existing, make parent directories as needed
- -v, --verbose print a message for each created directory
- -Z, --context=CTX set the SELinux security context of each created
3. 使用 help 命令查看 bash 内置命令
help 命令只能查看 bash 内置的命令.
- [root@Alibaba ~]# help cd
- cd: cd [-L|-P] [dir]
Change the shell working directory.
来源: http://www.bubuko.com/infodetail-2632749.html