Help:Unix online documentation
<<Back to Help:Unix help Documentation for unix can be found from two major sources: man pages and info pages.
Standard unix documentation[edit]
man pages[edit]
Most classic unix documentation is in the form of man ("manual") pages. Man pages are designed to be quick reference material, but typically are very poor tutorals for lengthy subjects.
Usage[edit]
- man -k keyword
- gives you the table of contents line for every man page that contains the keyword in the table of contents line. This can sometimes help you locate something when you don't know what it is called.
- man title
- gives the first man page for that title. For example:
man man
- would give you the page describing how the man command works. Almost every command on the system has a page describing it.
- man -s # title
- gives you the man page in a specific chapter (#) about title. For example, kill is in several chapters:
# man -k kill kill (1) - terminate a process with extreme prejudice kill (2V) - send signal to a process kill (3F) - send a signal to a process killpg (2) - send signal to a process group xkill (1) - kill a client by its X resource
If you just said 'man kill', you would probably get kill from chapter 1. To specify kill from section 2, you would type:
man -s 2 kill
Manual organization[edit]
The manuals are broken up into eight chapters, as follows:
- Commands
- Chapter 1: User commands
- Chapter 6 Games
- Programming
- Chapter 2 System Calls
- Chapter 3 Subroutines
- Chapter 3c: standard C library
- Chapter 3f: fortran library
- chapter 3m: math library
- Chapter 4 Devices
- Chapter 5 File Formats
- Chapter 7 Miscellaneous
Chapter 1 contains commands that you can type at the command prompt.
Chapter 6 describes various games available in the directory /usr/games.
Chapters 2 and 3 describe functions that you can call from your programs.
Chapter 5 describes the formats of special files in the system.
Each chapter also has its own subsections. For example:
kill (1) - terminate a process with extreme prejudice kill (2) - send signal to a process kill (3F) - send a signal to a process
kill (1) is a command you can type from the shell prompt.
kill (2) is a system call available to C programs.
kill (3F) is a fortran 77 library subroutine call.
The following commands would give a manual for each:
man -s 1 kill man -s 2 kill man -s 3f kill
Also, each chapter has an intro page that lists subsections, and contains other useful information. A few such info pages are available:
- Intro (1) - introduction to commands and application programs
- Intro (2) - introduction to system calls and error numbers
- Intro (3) - introduction to functions and libraries
- intro (3f) - introduction to FORTRAN library functions and subroutines
- Intro (3m) - introduction to mathematical library functions and constants
These intro pages typically contain signficant background material needed to understand the quick reference pages and will describe the structure of the chapter in question, and may contain list sof useful items within the section. (e.g,. Intro(3) has a list of libraries and Intro(1) has a list of commands.)
Additional and tutorial documentation[edit]
Vendor online tutorials are available for some subjects, and provides it in the form of PDF files or Answerbook files. Also, a large number of books about unix have been published in the last 20. Ask your system adminsitrator for recommendations if you need tutorial documentation on a specific area.
GNU Info[edit]
Info is a hypertext system that predates the web, and was originally designed to document GNU emacs, but now info is used to document many other large software systems distributed by the Free Software Foundation. Info pages can be read from within emacs, or with one of several installed external readers. The readers available are:
- emacs info mode (C-h i)
- text mode info (type info at the command line)
- xinfo graphical browser
The best of these three may be emacs itself, but all three are usable. (The text based info may have problems finding the correct info directory for different packages, as it does not merge indexes as emacs does. This can be fixed with a command line argument telling it which info directory to look in.)
The best way to learn info is to use its internal documentation. For instance, type
info info
Most packages from the Free Software Foundation use info for their primary documentation format. Some (e.g., gcc) use both info and man. Info is used for the longer more complex or more tutorial based documentation, and quick reference material is available via man.