Linux 中的帮助

Table of Contents

1.   --help

2.whatis 

3.man   等级数 


在Linux中我们要查命令的用法就可以用到帮助

1.<command>  --help

用此命令可以查看命令的基本用法,例如:

[dw@localhost Desktop]$ passwd --help
Usage: 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 message

可以看到给出了三列,第一列为参数,第二列为具体表示的意思,第三列为详细的解释。

其中首行中[]中的内容为选填,<>中的内容为必填,内容后面 ... 表示可以填多项。

2.whatis  <command>

用此命令可以查看命令的用途,例如:

[dw@localhost Desktop]$ whatis passwd
passwd (5)           - password file
openssl-passwd (1ssl) - compute password hashes
passwd (1)           - update user's authentication tokens

3.man   等级数  <command>

我们可以先用whatis 命令查看对应命令有哪几个级别的帮助信息,然后进入man命令查看帮助。

man手册的使用方法:

上下健浏览

space健向后翻一页

b             向前翻一页

Enter      向后翻一行

k              向前翻一行

查看时要查找时:

/关键词    或者   ?关键词

n              向后查找

N             向前查找

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值