---

12 examples to decode man pages in Linux/Unix

I feel man is one of the frequently used command along ls and cd commands in Linux. Have some more which you think we use frequently then post it in comments. Many people who are new to Linux do not know its potential. They just read a man page for a specific command and go away or just use ???man command???. This post is mainly meant for newbies to Linux/Unix. Do you know there are other commands which are similar to man command? Below are the list of commands which I call cousins to man pages.
Other helpful manuals available in Linux

info
help
???help
which
where
To know more about these commands you should visit my other post on them.

As I said man(abbreviation to manual) command is useful to read more details about any command you want.
Example 1: Get information about passwd command such as what it do, options available, examples to use it, related commands etc.

man passwd

This will be opened in a default file viewer, most of the Linux distributions use less as default editor. To exit from man pages use ???q???.
Example 2: As I said man pages are opened in a default viewer, if you want to change that use -P to change to some other viewer. Below example uses cat command for viewing man pages.

man -P cat passwd
Example 3: How about reading man with man pages. We can do that with following command.

man man
This post is about details displayed from above command(man man) output.

Example 4: There is a perception that man pages are written only for Linux command. That is not true. We have man pages written for normal commands, admin commands, configuration files, concepts etc. Below is the list of man categories.

Man pages types in Linux

1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
If you see there are total 9 type of man pages available. This number varies on different flavors of Linux/Unix. What that means for you? Let me explain with an example.
Read Full Post: http://www.linuxnix.com/understand-man-pages-in-linux/