How to find out the various manpage sections to which a command belongs

So, last time we discussed different sections of man pages. We took the example of mkdir which had 2 manual pages - one as a command and the other as a system call. But what if we don't know the right manpage and want to find it out or just for kicks want to know under how many sections does a command come?(of course the usage would differ). This can be done easily using the whatis command.

Whatis command displays the man page description of the command or the name we supply to it as an argument. Lets take mkdir again as an example.

[shredder12]$ whatis mkdir
mkdir (1)            - make directories
mkdir (2)            - create a directory

This way it will display the description of all man pages by the name mkdir, hence telling us the different sections. Similarly, we can try out other commands too.

[shredder12]$ whatis open
open (1)             - start a program on a new virtual terminal (VT).
open (2)             - open and possibly create a file or device

The number in the category shows the section of man page to which the command and the corresponding description belong.

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <img> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <p> <br>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Search Engines will index and follow ONLY links to allowed domains.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.