Contact us

Print

Using the man utility

Using online Help


There is usually more than one way to perform a task in Linux; as well as several different commands that can be used to carry out the same task. Most of these commands have special syntaxes, which again may vary from one OS to another. It is difficult even for Linux veterans to always remember the exact syntax and usage for these commands. This is the reason why most flavors of Linux come with an online help system. It is “online” in the sense that the help system is always available to the user.
Great efforts have been made in the Linux world to maintain a current and well documented online help system, but not every utility or command is available with this online system – some versions of some packages simply don’t come with comprehensive help systems. The user or system administrator sometimes needs to resort to Internet websites, news groups, mailing lists etc to get help.

Depending on the amount and level of help needed, several utilities are available – from the most verbose to the least verbose. One of such utilities is the ubiquitous “Manual pages” (man pages). You can almost always be certain that whatever Linux system you are working on will have the man utility installed.

Once you get accustomed to some commands that you will use regularly and often, you will find that, the options and usage of most Linux commands are pretty intuitive. The commands generally follow everyday English usage and they are almost always made up of the letters of their English language counterparts. Some examples are given below.

What are you trying to do?English EquivalentCommand
find out the amount of disk usage?Disk Usage disk=d , u=usage # du
find out who is presently logged on to the system ? who is there ? # who
Find out the current date and time ? date # date
Find out the current processes running List Process = ps # ps
Get a detailed (verbose) output of a command Verbose output Verbose=v # command –v
Get quick help for a command Help! Help !! Help!!! # command - -help





MAN


usage: man [-adfhktwW] [section] [-M path] [-P pager] [-S list]
  [-m system] [-p string] name ...

  a : 	find all matching entries
  c : 	do not use cat file
  d : 	print gobs of debugging information
  D : 	as for -d, but also display the pages
  f : 	same as whatis(1)
  h : 	print this help message





INFO


Usage: info [OPTION]... [MENU-ITEM...]
Read documentation in Info format.
Options:

 --apropos=SUBJECT        	look up SUBJECT in all indices of all manuals.
 --directory=DIR          	            add DIR to INFOPATH.
 --dribble=FILENAME       	remember user keystrokes in FILENAME.
 --file=FILENAME          	specify Info file to visit.
 --help                   		display this help and exit.



Exercise 2


Using the man utility


In this exercise you will use the man utility to get help in understanding it’s usage.

To use the man utility

1. Log in to the system as root and press ENTER
2. At the password prompt type “password” and press ENTER
3. Type “man” at the prompt

[root@localhost /root]# man

What manual page do you want?

4. The man command requires more arguments. Type “man man” at the prompt

[root@localhost /root]# man man




man(1) man(1)
NAME
man - format and display the on-line manual pages
manpath - determine user's search path for man pages…



5. The “ : ” sign at the bottom left of your screen shows that the output is too long to be
contained on the screen.
Press the <SPACE BAR> key until you see the word “END” at the bottom left of your screen.

…..To get a plain text version of a man page, without backspaces and underscores try


# man foo | col -b > foo.mantxt
September 2, 1995 1
(END)


To exit the man utility and return to your prompt type “q” at any time.

6. Now you will search through the manual page for the man command for every
occurrence of the word – “options”

Type “man man” at the prompt again

[root@localhost /root]# man man


7. Press the </> key on the keyboard followed by the word “options” at colon sign “:”

is given, the environment variable MANPATH is used. If no such
environment variable is found, the default list is found by consulting /etc/man.config.
An empty substring of MANPATH denotes the default list.

P pager
/options

All occurrences of the word options will be shown with a highlight.

8. Press “q” to quit the man utility.

9. Repeat the steps above to get the documentation/manual page for the “passwd” utility

What is the command to do this? What is the “passwd” command used for?

10. Log out of the system.



Created by: system. Last Modification: Saturday 04 of April, 2009 21:38:57 EST by wale.

...