linuxdot.org
 
 
 

Contents | Previous | Next

Command-line help

To many the online help in Linux offered by the info and man pages will appear terse and cryptic. That's because they act more as a quick reference, than a full tutorial.


--help

The --help option displays a fairly brief list of a command or program's options for many commands or programs, e.g.:

ls --help


$ info

The info command will give you help with many of the commands and programs in Linux.

info
Display the main menu.

Info keys

To select a menu option, move the cursor with the cursor keys, and press Enter to select an option.

KeyDescription
Enterselect menu option, indicated by a preceding asterix (*)
uup a node (i.e. opposite of Enter)
qquit


info ls
Display the main info page for the ls command.


info bash
Display the main info page for the bash shell.


$ man - manual

Man (manual) pages, unlike info pages, display everything on one page, making them handy to quickly find a command option.

man ls
Display the ls man page.

KeyDescription
Down cursorDown a line.
Up cursorUp a line.
SpaceDown a screen.
bBack a screen.
qQuit.


The man database

The title and brief description of each man page is stored in a simple database with the one-line format:

title       (section)  - description

The sections are as follows:

SectionTopic
1Utilities and shell commands.
2System calls.
3Library calls.
4Device and other special files.
5File formats.
6Games.
7Macro packages.
8System administration commands.
9Kernel routines.


man 1 -K process
Search all of each section 1 man page (utilities and shell commands) for the string, 'process', and for each match, prompt to view.


$ whatis

whatis ls
Display a brief description of the ls command.

Note:

whatis works by searching the man database for the complete word 'ls' in the title section, and displays the results.


$ apropos

apropos file
Display a list of man pages concerning files.

Note:

apropos works by searching the man database for the string 'file' in the title, section, and description sections, and displays the results.


$ which

which cat
Displays any aliases a program (in this case cat) has, followed by where the program is located (by searching your PATH for executable files).


$ whereis

whereis cat
Displays where a program is located, followed by where its man page is located.


/usr/doc and /usr/share/doc

When software is installed, documentation other than man and info pages is stored in either the /usr/doc and /usr/share/doc directories. This you can browse from the command-line with the text-only Internet browser, Lynx.

lynx /usr/share/doc
Browse the documentation in the /usr/share/doc directory.

Contents | Previous | Next

 
Copyright © 1998-2002 Linuxdot.org.
Linux ® is a registered trademark of Linus Torvalds.