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.
For this tutorial we teach you how to use man within the console or X-Windows Terminal program. If your *nix computer starts up automatically into X-Windows you will need to find the Terminal application and run it. This will present you with a small box with a prompt that you can type commands in. If your computer boots directly into the console, then you simply need to log in, and use the console for the rest of this tutorial.
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):
When you type man, without any arguments, and press enter you will see something like this:
The reason you received this response is because man always requires an argument in order to work. For most purposes, this argument will generally be the name of the program. Now that we know this, lets look up the manual page for a popular command line program, the program mkdir. To see the manual page for mkdir we would type the following and press enter:
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:
$ man mkdir
MKDIR(1) User Commands MKDIR(1)
-Z, --context=CONTEXT (SELinux) set security context to CONTEXT
Mandatory arguments to long options are mandatory for short options too.
--help display this help and exit
info coreutils mkdir
should give you access to the complete manual.
mkdir (coreutils) 5.2.1 February 2005 MKDIR(1)
As you can see the manual page for mkdir has extensive information. It tells you what the program does, the syntax for the command, the arguments that can be used with the command, who to report bugs found when using the program, and the copyright information for the program. With this information you should have no problem now seeing the manual for the myriad of *nix commands available.
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 poll (look in the warning section)
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.
Bleeping Computer: Linux Tutorials
BleepingComputer.com: Computer Help & Tutorials for the beginning computer user.
A filesystem is a way that an operating system organizes files on a disk. These filesystems come in many different flavors depending on your specific needs. For Windows, you have the NTFS, FAT, FAT16, or FAT32 filesystems. For Macintosh, you have the HFS filesystem and for Linux you have more filesystems than we can list in this tutorial. One of the great things about Linux is that you have the ...
This tutorial focuses on using GParted, or Gnome Partition Editor, a free and open source partition editor. To use GParted, you must first download the CD Image file (.iso file) of GParted Live for this program. Instructions on where to find and how to burn the GParted ISO file are covered in the Preparation step. In this tutorial we will be using Microsoft Windows XP for certain steps. If you use ...
A file extension, or file name extension, is the letters immediately shown after the last period in a file name. For example, the file extension.txt has an extension of .txt. This extension allows the operating system to know what type of file it is and what program to run when you double-click on it. There are no particular rules regarding how an extension should be formatted other than it must ...
When a hard drive is installed in a computer, it must be partitioned before you can format and use it. Partitioning a drive is when you divide the total storage of a drive into different pieces. These pieces are called partitions. Once a partition is created, it can then be formatted so that it can be used on a computer. When partitions are made, you specify the total amount of storage that you ...
Windows allows you to lock your screen so that others cannot access your computer without entering your password. This is very useful when you need to be away from your computer and do not want other people to use it or access your documents. This tutorial will walk you through locking your screen in all versions of Windows as well as a method of automatically locking your screen when your ...