- Most Linux commands have an associated manual page
- Often known as a manpage
- Viewed with the man command:
$ man ls
- Press
q
to quit and return to the shell prompt
Nguyen Hai Chau
Vietnam National University
$ man ls
q
to quit and return to the shell promptman
uses the less
viewerKey | Action |
---|---|
Space | jump down a page |
b | jump back up a page |
/word | search for the next occurrence of word |
n | repeat the previous search |
g | go to the top |
passwd
command/etc/passwd
filepasswd(5)
man 1 passwd
man 5 passwd
$ man passwd
man(7)
intro
:$ man 8 intro
whatis
$ whatis hostname
hostname (1) - show or set the system's host name
hostname (7) - host name resolution description
$ whatis tac
man -f
is equivalent to whatis
$ man -t head > head.ps
$ man -t head | lpr
apropos
apropos
:$ apropos gif
gif2tiff (1) create a TIFF file from a GIF87 format image file
giftopnm (1) convert a GIF file into a portable anymap
ppmtogif (1) convert a portable pixmap into a GIF file
Data::Dumper (3) stringified perl data structures, suitable for both printing and eval
$ apropos gif | grep '(1)'
man -k
is equivalent to apropos
man -a
man -a
:$ man -a hostname
hostname(1)
hostname(8)
man -K
man -K
(note upper-case) does this:$ man -K printer
$ man gzip
$ man gunzip
$ man zcat
cd(1)
refers the reader to bash(1)
echo(1)
relates to /bin/echo
, but in most shells echo is a separate built-in command$ help help
help: help [-s] [pattern ...]
Display helpful information about builtin commands. If PATTERN is
...
-a
and -w
options to show the locations of all manpages with a given name:$ man -aw passwd
/usr/man/man1/passwd.1.gz
/usr/man/man5/passwd.5.gz
/usr/man
and /usr/share/man
/usr/local/man
info
$ info cat
$ info ls
q
to quit and return to the shellpinfo
Key | Action |
---|---|
Tab | jump to next hyperlink |
Enter | follow hyperlink |
l | return to your previous location |
n | go to the following ('Next') node |
p | go to the preceding ('Prev') node |
u | go to the parent ('Up') node |
/usr/share/doc/
/usr/share/doc/
contains other formats of documentation
/usr/share/doc/grep-2.4/
/usr/share/doc
/usr/share/doc
/usr/share/doc
is often information only relevant to system administration of a
package, not users of it:
Sometimes more user-friendly documentation than elsewhere
/usr/share/doc/ImageMagick-4.2.9/ImageMagick.html
/usr/share/doc/
rather
than man pages$ netscape -help
$ vim -h
--help
option for this:$ grep --help
info
without specifying which document to view?