Linux how to: Accessing documentation

Linux offers many helpful commands for accessing its documentation. Here's a quick guide.

by Matthew Helmke - Linux, like Unix, is a self-documenting system, with man pages accessible through the man command. But Linux also offers many other helpful commands for accessing its documentation. You can use the apropos command--for example, with a keyword such as partition--to find commands related to partitioning, like this:

<font face="courier"><b>$ apropos partition</b> 
diskdumpfmt          (8)  - format a dump device or a partition 
fdisk                (8)  - Partition table manipulator for Linux 
GNU Parted [parted]  (8)  - a partition manipulation program 
mpartition           (1)  - partition an MSDOS hard disk 
MPI_Cart_sub         (3)  - Partitions a communicator into subgroups which form  
                            lower-dimensional cartesian subgrids 
partprobe            (8)  - inform the OS of partition table changes 
pvcreate             (8)  - initialize a disk or partition for use by LVM 
sfdisk               (8)  - Partition table manipulator for Linux </font>

[ See also: Unix How To: Repeating Commands in Bash ]

To find a command and its documentation, you can use the whereis command. For example, if you are looking for the fdisk command, you can do this:

$ whereis fdisk
fdisk: /sbin/fdisk /usr/share/man/man8/fdisk.8.gz

Using Man Pages

To learn more about a command or program, use the man command, followed by the name of the command. Man pages for Linux and X Window commands are within the /usr/share/man, /usr/local/share/man, and /usr/X11R6/man directories; so, for example, to read the rm command's man page, use the man command like this:

$ man rm

[ See also: Favorite Unix Tools & Commands ]

After you press Enter, the less command (a Linux command known as a pager) displays the man page. The less command is a text browser you can use to scroll forward and backward (even sideways) through the document to learn more about the command. Type the letter h to get help, use the forward slash / to enter a search string, or press q to quit.


Although nearly all the hundreds of GNU commands included with Linux each have a man page, you must use the info command to read detailed information about using a GNU command. For example, to learn even more about bash (which has a rather extensive manual page), use the info command like this:

$ info bash

Press the n and p keys to navigate through the document, or scroll down to a menu item on the screen and press Enter to read about a specific feature. Press q to quit reading.


Ubuntu Unleashed

This tip is adapted by Matthew Helmke as based on the book, Ubuntu Unleashed: 2010 Edition (covering 9.10 and 10.4), authored by Andrew Hudson, Paul Hudson, Matthew Helmke and Ryan Troy, ISBN 0672331098, published by SAMS Dec. 2009, Copyright 2010 by SAMS Publishing.

For a complete table of contents, please visit:

Want to cash in on your IT savvy? Send your tip to If we post it, we'll send you a $25 Amazon e-gift card.

ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon