Help command in Linux

a help command man
1. Grammar
man command
Get help for the specified command.
2. Examples
man ls
See help for ls.
 
Second man's level


 
See which level of help a command has
man -f command
whatis command
 
3View all help related to commands
man -k command
equivalent to
apropos Command
E.g
apropos passwd
 
Three actual combat
[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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326188041&siteId=291194637