Using man to get help in Linux and UnixBy Lawrence Abrams on November 10, 2005 | Last Updated: February 27, 2012 | Read 24,127 times.Table of Contents Many users who try Linux for the first time can get confused easily as their is no readily apparent help system available to them. As Windows programs are typically graphical in nature, it is not too hard to find the help menu for that particular program. Linux, on the other hand, has thousands of very useful programs that are run from the command line and therefore it may not be easy to find the help for that particular programs. Thankfully for us, developers created the program called man. Man, which stands for manual, is a program that can be used to view the help or manual page for the thousands of individual programs found in Linux or Unix. For the most part, but not always, when a program in Linux/Unix is developed the developer will also create a separate man page file that contains the manual for that particular program or command. When the program is installed, the installer will also install the man page that was included into the proper location so that you can easily read the manual page as needed. This tutorial will provide a basic overview of how to use man to see the manual, or help pages, for a particular program.
Now that you are at a prompt, lets start learning how to use man. At your prompt type the following (please note for these exercises my prompt may look different than yours): man When you type man, without any arguments, and press enter you will see something like this:
man mkdir After you press enter, the man command will search for the manual page corresponding to mkdir and display it. So after typing that command you would see something like this:
Sometimes you need help with a particular file or program and are unsure exactly which manual page to look up. Thankfully there is a argument that you can use with man that will allow you to search through all the man pages for a particular keyword or phrase. This argument is the -K argument. The syntax for this command is the following: man -K keyword So for example, lets say that you wanted to search for all manual pages that contained the word fstab, you would type: man -K fstab This would then return a list of manual pages that contain that word and give you the option to view it (Y), skip it (N), or quit the search (Q). To view one of the matches simply press the y button and that particular manual page will show. Now that you know how to view the manual pages of *nix commands using man, get out there and explore your operating system. There are many different commands that will be useful to know. A very popular manual being intro; man intro. Man also can be fun. Try some of these man commands for some hidden surprises (may not work on all linux distributions):
man c And if worse comes to worse, and you still need help using man, you can always type the command man man and press enter :) As always, if you have any questions please feel free to ask them in the Linux Forum.
|