Table of Contents
This chapter will explain the use of man pages (also called manual pages) on your Unix or Linux computer.
You will learn the man command together with related commands like whereis, whatis and mandb.
Most Unix files and commands have pretty good man pages to explain their use. Man pages also come in handy when you are using multiple flavours of Unix or several Linux distributions since options and parameters sometimes vary.
paul@laika:~$ man whois Reformatting whois(1), please wait...
Most configuration files have their own manual.
paul@laika:~$ man syslog.conf Reformatting syslog.conf(5), please wait...
paul@laika:~$ man syslogd Reformatting syslogd(8), please wait...
paul@laika:~$ man -k syslog lm-syslog-setup (8) - configure laptop mode to switch syslog.conf ... logger (1) - a shell command interface to the syslog(3) ... syslog-facility (8) - Setup and remove LOCALx facility for sysklogd syslog.conf (5) - syslogd(8) configuration file syslogd (8) - Linux system logging utilities. syslogd-listfiles (8) - list system logfiles
paul@u810:~$ whatis route route (8) - show / manipulate the IP routing table
paul@laika:~$ whereis -m whois whois: /usr/share/man/man1/whois.1.gz
paul@laika:~$ man /usr/share/man/man1/whois.1.gz
1 Executable programs or shell commands 2 System calls (functions provided by the kernel) 3 Library calls (functions within program libraries) 4 Special files (usually found in /dev) 5 File formats and conventions eg /etc/passwd 6 Games 7 Miscellaneous (including macro packages and conventions), e.g. man(7) 8 System administration commands (usually only for root) 9 Kernel routines [Non standard]
Therefor, when referring to the man page of the passwd command, you will see it written as passwd(1); when referring to the passwd file, you will see it written as passwd(5). The screenshot explains how to open the man page in the correct section.
[paul@RHEL52 ~]$ man passwd # opens the first manual found [paul@RHEL52 ~]$ man 5 passwd # opens a page from section 5
If you want to know more about man, then Read The Fantastic Manual (RTFM).
Unfortunately, manual pages do not have the answer to everything...
paul@laika:~$ man woman No manual entry for woman
root@laika:~# mandb 0 man subdirectories contained newer manual pages. 0 manual pages were added. 0 stray cats were added. 0 old database entries were purged.
[root@centos65 ~]# apropos scsi scsi: nothing appropriate [root@centos65 ~]# makewhatis [root@centos65 ~]# apropos scsi hpsa (4) - HP Smart Array SCSI driver lsscsi (8) - list SCSI devices (or hosts) and their attributes sd (4) - Driver for SCSI Disk Drives st (4) - SCSI tape device