Linux —— 帮助

1. --help

help命令用来显示shell内部命令的帮助信息。

help命令只能显示shell内部的命令帮助信息。而对于外部命令的帮助信息只能使用man或者info命令查看。

命令用途
命令 + --help查看命令的基本用法
[内容]在执行过程中可加可不加
...加入的内容个数任意
<>在执行操作时必须加入

实例:

[root@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

whatis命令查询一个命令执行什么功能,并将查询结果打印出来。

命令用途
whatis + 命令名称查看命令的用途

实例:

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

3. man

命令用途
man   选项   参数(级别、对象)通过man指令可以查看Linux中的指令帮助、配置文件帮助和编程帮助等信息
选项用途
-a在所有的man手册中搜索,显示所有匹配项
-f显示命令的简短描述信息
-P/-p指定内容时使用分页程序,注意在-p后输入所分页数
-M/-m指定man手册搜索路径
-k模糊查找关键字
-d/-D搜索路径信息,不显示手册页内容
级别意义
1命令
2系统调用
3函数调用
4系统特殊文件
5系统配置文件
6游戏
7特殊包
8系统管理命令
9内核规则

实例:

man -k passwd        ## 搜索whatis数据库,模糊查找关键字

chgpasswd (8)        - update group passwords in batch mode
chpasswd (8)         - update passwords in batch mode
fgetpwent_r (3)      - get passwd file entry reentrantly
getpwent_r (3)       - get passwd file entry reentrantly
gpasswd (1)          - administer /etc/group and /etc/gshadow
grub2-mkpasswd-pbkdf2 (1) - Generate a PBKDF2 password hash.
lpasswd (1)          - Change group or user password
openssl-passwd (1ssl) - compute password hashes
pam_localuser (8)    - require users to be listed in /etc/passwd
passwd (1)           - update user's authentication tokens
passwd (5)           - password file
passwd2des (3)       - RFS password encryption
pwhistory_helper (8) - Helper binary that transfers password hashes from pass...
saslpasswd2 (8)      - set a user's sasl password
smbpasswd (5)        - The Samba encrypted password file
sslpasswd (1ssl)     - compute password hashes
userpasswd (1)       - A graphical tool to allow users to change their passwo...
vncpasswd (1)        - change the VNC password

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值