Linux meta-Help
I wanted to write this article for a long time. Today i have finally made my mind of inking it. When i try out something new, first thing i do is learn how to access the help system of that application. Here i would like to explore some well known ways of getting help in linux.
- If you are in a shell and want to know the usage of a command you can do so by passing it "--help" option. This lists various options that can be passed to the command and its expected behaviour. Its purpose is to give a brief description of the command and list its most frequently used options. It is not exhaustive documentation.
- To know more about the command you can look at its manual page. Easiest way to view the manual (man) page is by using the man command. As the name suggests this is like a manual of the command. It lists out all possible options that can be used with the command and its expected behaviour. But man pages are not very straightforward to follow. For newbies, man pages are often intimidating. They usually do not provide example usages of the command. However they serve the purpose of being precise and exhaustive manual of the program/utility/function they are documenting.
- To get saner and user friendly documentation we can check the command's info page. Usually info pages are more informative than manual pages. The biggest advantage of info pages is that they usually include example usage of the command. They also have hyperlinks, so we can jump from one info page to another, getting a clear understanding of the related terms. A command's info page can be accessed using the info command.
- Google. Ah, the obvious choice to find any unknown. There is also a linux specific google search channel which can be tried. You may find solutions to your problem in either a forum, mailing list or documentation/howto site.
- What if you don't have access to internet (highly improbable)? Anyways, in that can use the apropos command. It searches through manual descriptions of all the commands. This way we can find out the correct command to solve our problem.
- whatis is another useful command. It gives short (usually one line) description of the command. Infact the apropos command internally uses the whatis database.
- From vim you can directly open man page of a command/function used by pressing 'K' on it.
- konqueror has defined man and info protocols. So from konqueror we can view an info/man page of a command by typing info:command and man:command respectively. These html pages are generated using the info2html utility.