--help command is quick start guide.
man command is encyclopedia.
--help command is quick start guide.
[Command] --help
Exp: passwd --help
Function 1 Manual of command
man [Command]
Exp: man passwd
Each command contains several sections.
Check all manual sections
whatis [Command]
Exp: whatis passwd
Direct to specific section
man [Section] [Command]
man 5 passwd
Flip to next section
man -a [Command]
Exp: man -a passwd
Function 2 Search engine of command
If you forgot some command, can insert keywords to search all commands that contains keywords
man -k [Keyword]
Exp: man -k passwd
man -k [1st Priority Keyword] | grep [2nd Priority Keyword]
Find add user function, Exp: man -k passwd | grep add
Error Code
student@localhost:~$ man -k passwd
passwd: nothing appropriate.
Root Cause
Recent software updates haven't updated the database
Solution
Run sudo mandb to rebuild database