| Lesson 8 || Configuring man |
| Objective ||Change the default Path for the man Command. |
Change default Path for the man Command
Describe how to change the default path for the man command.
The default path for the
You can alter this path to customize the results of the
command. Using a text editor such as vi, you can open man.config to change the default path, as well as the location of manual entries.
For example, if you download new programs, such as SAMBA or NMAP, you can change the default search path to look for specific files first.
You can also alter the path to refer to different supporting programs, including nroff, eqn, and tbl.
To find out more about the man.config file, you can type man.config
The actual location of the manual pages varies from system to system. Common locations include /usr/share/man and /usr/man. Below is the output of the files section of a man.config file on a Linux system:
Each of these lines indicates specific manual files. This path also determines the search order for specific commands.
The search order in the man.config file overrides the manual layout. For example, imagine that two man pages exist for the
mount command. One, which appears in section 8 of the man file, exists in the /usr/man directory. The second, which appears in section 2, appears in /usr/local/man. The first refers to mount as an administrative command, whereas the second refers to mount as a system call.
According to the man.config entries given above, man would render information on the command found in section 8 first, because this particular configuration file lists the /user/man directory first. As you customize your manual to return more intuitive results, you will have to take this feature into account.
The whereis command
Perhaps the quickest way to find the manual pages for a particular command is with the
whereis command, which will locate the source, executable, and manual page for a command. For example, below is the result of the
whereis command on a computer running Linux:
man: /usr/bin/man /etc/man.config /usr/X386/bin/man
In this output, various
man-related files are mixed together.
The manual files themselves are in the subdirectories (grouped by section) of the /usr/man path.
Configuring Unix Manual - Quiz