Linux Training

Linux training for private, public & voluntary sector.

0800 024 8425

City LinUX Training Courses

Section 1.
Getting Help
.


"The Linux philosophy is ’laugh in the face of danger’. Oops. Wrong one. ’Do it yourself’.
That’s it."

Linus Torvald 1996.

1. Getting help.

The main options for obtaining help are the man pages, infotext, built in command help and web pages.

1.1. Tools:

man, info, apropos, whereis, whatis.

bash-4.2$ man -f man
man []            (1)  - format and display the on-line manual pages
man []            (7)  - pages - conventions for writing Linux man pages
man.conf []       (5)  - configuration data for man
man []            (1)  - format and display the on-line manual pages
man []            (7)  - pages - conventions for writing Linux man pages
man.conf []       (5)  - configuration data for man
man []            (1)  - format and display the on-line manual pages
man []            (7)  - macros to format man pages
man []            (7)  - pages - conventions for writing Linux man pages
man.conf []       (5)  - configuration data for man

bash-4.2$ man man

man 1 September 19, 2005

NAME man − format and display the on-line manual pages

SYNOPSIS man name ...

DESCRIPTION man formats and displays the on-line manual pages. If you specify section, man looks only in that section of the manual. name is normally the name of the manual page, which is typically the name of a command, function, or file. However, if name contains a slash then man interprets it as a file specification, so that you can do man ./foo.5 or even man /cd/foo/bar.1.gz.

See below for a description of where man looks for the manual page files.

MANUAL SECTIONS The standard sections of the manual include:

1 User Commands

2 System Calls

3 C Library Functions

4 Devices and Special Files

5 File Formats and Conventions

6 Games et. Al.

7 Miscellanea

8 System Administration tools and Daemons

Distributors customise the manual section to their specifics, which often include additional sections.

OPTIONS

−C config_file Specify the configuration file to use; the default may be based)/usr/lib/man.conf(Debian /etc/man.config (Red Hat, CentOS et al) or /usr/lib64/man.conf (Slackware).
(See man.conf (5).)

−M path Specify the list of directories to search for man pages. Separate the directories with colons. An empty list is the same as not specifying −M at all. See SEARCH PATH FOR MANUAL PAGES.

−P pager Specify which pager to use. This option overrides the MANPAGER environment variable, which in turn overrides the PAGER variable. By default, man uses /usr/bin/less -is.

−B Specify which browser to use on HTML files. This option overrides the BROWSER environment variable. By default, man uses /usr/bin/lynx,

−H Specify a command that renders HTML files as text. This option overrides the HTMLPAGER environment variable. By default, man uses /usr/bin/lynx -dump.
Linux Man pages - Frederico Lucifredi et al. (truncated and edited)

Every systems administrator should be able to write simple man pages in support of their administration tools. See the chapter on nroff and troff to learn more on how to do this.

1.2. Built in help.

Many commands have some built in help text. Using commands with the options "-h", "--help" or "-?" will often produce limited help.

1.3. Web pages

There is extensive help available on the web. Search on any Linux command and you will almost certainly find a wealth of material on line including the man pages. The Ubuntu web pages have been, for the most part, quite beautifully prepared for use in a web browser. If you have internet access and a web browser available using "ubunto man <command name>" will bring forth the man pages in a form much more readily navigated than that managed in a terminal window.

1.4. Exercises.

Try the following:

sa101$ man -f man
sa101$ man apropos
sa101$ apropos man
sa101$ info
sa101$ info info
sa101$ info man
sa101$ whatis man
sa101$ whereis man
sa101$ man whereis
sa101$ whereis -m man
sa101$ man passwd
sa101$ man 5 passwd
sa101$ man useradd

Try using "man info" in a search engine.

Who is the current maintainer of "man"?

What does the -P option allow you to do?

Examine the man.conf file.

Experiment with the tools listed in the table below.

1.5. Tools:

Image imgs/sa101-1.png

 


The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.