Getting Help When Working With Linux

Before you start

Objectives: Learn about different ways to get help when working with Linux commands.

Prerequisites: you should know what are pagers.

Key terms: command, help, man, pages, info, Linux, ls, use, example, information, manual, basic


Man Pages and Info Pages

The most common help system are the man pages or manual pages. The other help system is the infopages. They are very similar, they both give us more information about Linux commands. To access the manual pages we simply use the “man” command, and then type the name of the command we are getting info on. The manual page about that command will then be displayed on the screen. For example, on the picture below we have entered the “man ls” command.

 1 man command

man ls Command

Notice that the “man” command opens the manual page using the default system pager. In our case the, the default pager is “less” so we can use the arrow keys to move up and down, use the page-up and page-down buttons, etc. To exit the pager we press the “q” button.

Man pages are designed to quickly give us basic information about the command. They are not designed to teach us how to actually work with that command. Man pages are typically stored in the /usr/man or /usr/share/man directory. Subdirectories store man pages for different types of commands or languages. Info pages will usually give us more information about the command than the manpages. Info pages allow us to use hypertext links by using the Tab key to move amond links, and the Enter key to follow links. For example, on the picture below we see the result of the “info ls” command.

 2 info pages

info ls Command

Keep in mind that not all commands have both info and man pages, tough many of them do. To access the info page for particular command, we simply type “info” and then the name of the command or file we are getting information on.

On-line Help System

Linux comes with an on-line help system, and that is the “help” function which is built in to every command. If we type the command name, and then “–help” (or sometimes just “-h”), we will get a basic help screen on how to use that particular command. This will typically be the short description of the command, list of switches, and basic syntax example. For example, on the picture below we can see the result of the “ls –help” command.

 3 help Command

ls –help Command

Sometimes we can simply use “-h” instead of “–help”.

Getting More Help

For more complex tasks we simply can search the Internet in general, visit forums with Linux topics, and similar. The whole documentation for particular Linux distribution will typically be available on the Internet. For Ubuntu tutorials and questions, be sure to visit http://askubuntu.com/, and http://howtoubuntu.org/. So, there is no central location for Linux knowledge, but the closest thing to that is the Linux Documentation Project (http://www.tldp.org/).