1.whatis command ##查看命令用途
如果whatis不能查看,可在root权限下用mandb更新系统。
更新后whatis 命令的查看结果为:
2.command --help ##查看命令的基本用法

| 格式 | 用途 |
|---|---|
| [内容] | 在执行时可加可不加 |
| … | 加入的内容个数任意 |
| <内容> | 在执行操作时必须加入的 |
实验:用–help查看passwd命令的结果:
[root@workstation Desktop]# which passwd/usr/bin/passwd[root@workstation Desktop]# /usr/bin/passwd --helpUsage: passwd [OPTION...] <accountName> -k, --keep-tokens keep non-expired authentication tokens -d, --delete delete the password for the named account (root only); also removes password lock if any -l, --lock lock the password for the named account (root only) -u, --unlock unlock the password for the named account (root only) -e, --expire expire the password for the named account (root only) -f, --force force operation -x, --maximum=DAYS maximum password lifetime (root only) -n, --minimum=DAYS minimum password lifetime (root only) -w, --warning=DAYS number of days warning users receives before password expiration (root only) -i, --inactive=DAYS number of days after password expiration when an account becomes disabled (root only) -S, --status report password status on the named account (root only) --stdin read new tokens from stdin (root only)Help options: -?, --help Show this help message --usage Display brief usage message123456789101112131415161718192021222324
3.man filename(文件名称) ##查看用途
说明:对于不可用- -help查询的命令,可以用man查看。
[root@workstation Desktop]# /etc/passwd --helpbash: /etc/passwd: Permission denied ##--help无法查看[root@workstation Desktop]# file /usr/bin/passwd /usr/bin/passwd: setuid ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=a3637110e27e9a48dced9f38b4ae43388d32d0e4, stripped##/usr/bin/passwd 是一个二进制的可执行文件[root@workstation Desktop]# file /etc/passwd/etc/passwd: ASCII text##/etc/passwd是一个纯文本文件,记录的内容是系统可以识别的配置[root@workstation Desktop]# man passwd12345678910

3.1 man命令的用法**man level targer**
man man ##man命令本身
man级别(level)
