Obtaining help

Obtaining help

Contrary to popular belief, commands and programs in Linux tend to be very well documented - usually more so than in Windows, which tends to document commands only if they are very popular, and then only document up to a certain "level".

This section outlines the main ways of getting such information. Note that many distributions, such as Mandrake, RedHat and SuSE, have provided a graphical user interface which can be used to access such information using something like a specialised browser.

The "man" command

Almost every command in Linux has online help available from the command line, through the "man" (manual) command.

Try it now - type in "man ls". The resulting page will describe the command, then describe every option, then give further details about the program, the author, and so on. This information is shown using the "less" command (which we’ll describe later on). For now, it is sufficient to know that you can use the up and down arrow, PgUp and PgDn keys to move around, and the Q key to quit.

The "info" command

Another source of online help is the "info" command. Some Linux commands may supply both "man" and "info" documentation. As a general rule, "info" documentation is more verbose and descriptive, like a user guide, while "man" documentation is more like a reference manual, giving lists of options and parameters, and the meaning of each.

Try typing "info ls" now. The method for moving around in "info" is quite similar to "man" - you can also use the arrows and PgUp/PgDn to move, and Q to quit. The main difference is that info pages can contain "menus" of links which lead to other pages. To follow a link, move the text cursor to it with the arrow keys, and press Enter.

The "--help" option

Most (but not all) programs have a --help option which displays a very short description of its main options and parameters. Try typing "ls --help" to see. This will produce more than one screenful of information, so you’ll have to use the terminal’s scrollbar to see what was displayed.

The "--help" information rarely says anything that isn’t also found in the "man" documentation, so it’s rarely needed, except in a tiny number of programs which do not supply any other form of documentation.

The Linux Documentation Project

The L.D.P. is a project which collects not only all the man and info pages, but has a huge collection of longer guides, howtos and mini-howtos on a wide variety of topics. Unlike man and info pages, these howtos are not about a specific command, but rather how to accomplish a particular task. When you’re looking for information on the internet, this is probably the best place to start.