一 帮助命令man
1、语法
man 命令
获取指定命令的帮助。
2、举例
man ls
查看ls的帮助。
二 man的级别
查看命令拥有哪个级别的帮助
man -f 命令
whatis 命令
三 查看和命令相关的所有帮助
man -k 命令
相当于
apropos 命令
例如
apropos passwd
三 实战
[root@localhost test]# man ls
[root@localhost test]# man man
[root@localhost test]# man -f ls
ls (1) - list directory contents
ls (1p) - list directory contents
[root@localhost test]# man -f passwd
sslpasswd (1ssl) - compute password hashes
passwd (1) - update user's authentication tokens
passwd (5) - password file
[root@localhost test]# man 1 passwd
[root@localhost test]# man 5 passwd
[root@localhost test]# whereis passwd
passwd: /usr/bin/passwd /etc/passwd /usr/share/man/man1/passwd.1.gz /usr/share/man/man5/passwd.5.gz
[root@localhost test]# man 5 passwd
[root@localhost test]# whatis ls
ls (1) - list directory contents
ls (1p) - list directory contents
[root@localhost test]# man -f null
null (4) - data sink
[root@localhost test]# man 4 null
[root@localhost test]# whereis ifconfig
ifconfig: /usr/sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz
[root@localhost test]# apropos passwd
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
lppasswd (1) - add, change, or delete digest passwords.
pam_localuser (8) - require users to be listed in /etc/passwd
passwd (1) - update user's authentication tokens
sslpasswd (1ssl) - compute password hashes
passwd (5) - password file
passwd2des (3) - RFS password encryption
pwhistory_helper (8) - Helper binary that transfers password hashes from passwd or shadow to opasswd
saslpasswd2 (8) - set a user's sasl password
smbpasswd (5) - The Samba encrypted password file
smbpasswd (8) - change a user's SMB password
[root@localhost test]# man -k passwd
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
lppasswd (1) - add, change, or delete digest passwords.
pam_localuser (8) - require users to be listed in /etc/passwd
passwd (1) - update user's authentication tokens
sslpasswd (1ssl) - compute password hashes
passwd (5) - password file
passwd2des (3) - RFS password encryption
pwhistory_helper (8) - Helper binary that transfers password hashes from passwd or shadow to opasswd
saslpasswd2 (8) - set a user's sasl password
smbpasswd (5) - The Samba encrypted password file
smbpasswd (8) - change a user's SMB password