man is one of the very first Unix commands everyone learns. It shows a brief manual for most of the commands available on your Unix-like OS and provides cross-references to other similar manuals.
What is man command used for
Many Unix commands are quite useful even if run without command line parameters, but as soon as you reach the next comfort level, you start wondering about extracting even more from the same command. This is when reading manuals becomes vital, and man offers a great way to explore them.
All Unix-like systems are provided with extensive manuals. Even if you don't have the material printed on paper, you still have plenty of information installed with your OS.
Most usually, manual pages are found under /usr/share/man directory. Manuals are not presented in clear text – there's a markup language commands which should be interpreted by the man command.
What is a Unix manual page (manpage)
All the manuals for Unix commands are split into clearly marked sections:
- NAME – command name as it should be typed
- SYNOPSIS – syntax for running a command – all the possible command line options
- DESCRIPTION – textual description of what a command is used for
- OPTIONS – full list of command line options with thorough explanations
- FILES – files which are used by a command
- SEE ALSO – other relevant commands you might want to look at
- BUGS – known bugs and limitations of a command
- AUTHOR – list of command authors, developers and most current maintainers
A manual page generated by man command is nothing but a clear text you can access from most basic Unix shell session, formatted as per your terminal capabilities (most often you see that section names are shown in bold font, but that's about it).
Using man command in Unix
The simplest way to get help in Unix is to run man command and specify a name of another Unix command as a parameter. Naturally, the first thing you should do is to have man show you a manual for itself:
ubuntu$ man man
This is how it would look (click the image o get the full resolution):