Getting Information at the Command Line

Help Center > Introduction to Unix > Getting Information at the Command Line

man (Manual)

When you first start trying to get information in Unix, a command's manual pages ("man" pages) are probably the first place you want to look. The documentation is derived from a manual originally called the UNIX Programmer's Manual. The manual will tell you the correct syntax for entering a command, extra options ("flags") that you could use, and other features of a program or command. Just enter the command man followed by the name of the command that you want to get information about:

% man ls

After you enter the command, it will print the manual page to the screen. Press the spacebar to scroll down.

-h, --help (Help)

On many systems, typing a command followed by --help will give you a streamlined version of what's contained in the man pages. Unfortunately, this command doesn't work on the Uniform Access computers at the UW (nor does it work with all commands, making it, generally, less useful than man), but here is a (trimmed off) example of its output on a personal machine:

$ emacs --help
Usage: emacs [-t term] [--terminal term] [-nw] [--no-windows] [--batch]
[-q] [--no-init-file] [-u user] [--user user] [--debug-init]
[--version] [--no-site-file]
[-f func] [--funcall func] [-l file] [--load file] [--insert file]
[+linenum] file-to-visit [--kill]
Report bugs to bug-gnu-emacs@prep.ai.mit.edu. First, please see
the Bugs section of the Emacs manual or the file BUGS.

apropos (Keyword Search)

If you're looking for a command, but you're not sure what the name of the command is, apropos is a good tool. Type apropos followed by a descriptive word of what you're looking for, and you will get a dump of commands whose descriptions contain the word you're looking for. These listings can be long, but if you're in a real bind, you may find what you're looking for. For instance, try this command:

% apropos mail
last modified on 01/29/2008 12:03