Commands covered in this section: man
UNIX has a built-in documentation system known as man pages. Since UNIX was originally developed as an environment for programmers, man pages tend to be fairly terse (some might say cryptic!). However, it is possible for novice users to glean an occasional bit of wisdom from them.
Use the man command to find the man page for the ls command.
$ man ls User Commands ls(1) NAME ls - list contents of directory SYNOPSIS /usr/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ] [ file... ] /usr/xpg4/bin/ls [ -aAbcCdfFgilLmnopqrRstux1 ] [ file... ] DESCRIPTION For each file that is a directory, ls lists the contents of the directory; for each file that is an ordinary file, ls repeats its name and any other information requested. The output is sorted alphabetically by default. When no argu- ment is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file arguments appear before directories --More--(4%)
If the requested man page is too long to be displayed on a single screen (usually the case), it will be displayed in a pager (the default is more). To move forward through the page, use the space bar. To move backward, press the 'b' key. To quit, press 'q'.
Notice that you must know the name of a given command to see the corresponding man page. You can use the "-k" option to search for man pages related to a specified keyword.
Let's say you are interested in more information about the SSH agent (a program that manages keys used for SSH authentication, but you can't remember the name of the command. Use man -k to search for man pages related to "ssh."
$ man -k ssh Date::Manip::TZ::asshan00 (3pm) - Support for the Asia/Shanghai time zone git-shell (1) - Restricted login shell for Git-only SSH access slogin (1) - OpenSSH SSH client (remote login program) ssh (1) - OpenSSH SSH client (remote login program) ssh-add (1) - adds RSA or DSA identities to the authentication agent ssh-agent (1) - authentication agent ssh-copy-id (1) - install your public key in a remote machine's authoriz... ssh-keygen (1) - authentication key generation, management and conversion ssh-keyscan (1) - gather ssh public keys ssh-keysign (8) - ssh helper program for host-based authentication ssh-pkcs11-helper (8) - ssh-agent helper program for PKCS#11 support ssh_config (5) - OpenSSH SSH client configuration files sshd (8) - OpenSSH SSH daemon sshd_config (5) - OpenSSH SSH daemon configuration file sss_ssh_authorizedkeys (1) - get OpenSSH authorized keys sss_ssh_knownhostsproxy (1) - get OpenSSH host keys Tcl_IsShared (3) - manipulate Tcl objects XAllocClassHint (3) - allocate class hints structure and set or read a windo... XClassHint (3) - allocate class hints structure and set or read a windo... XGetClassHint (3) - allocate class hints structure and set or read a windo... XSetClassHint (3) - allocate class hints structure and set or read a windo... XtIsShell (3) - obtain and verify a widget's class
In the output from man -k, the names of the relevant commands appear in the left column. In our example, you would enter man ssh-agent to find out more about that program.
Since man pages are not really aimed at novice users, you may also wish to use your favorite search engine to find answers to your questions about a particular UNIX command.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.