On a Linux or Unix system, the man
command is used to display the manual pages for various commands and utilities. Sometimes, different packages or software sources may install man pages with the same name, causing them to overlap.
To view overlapping man pages with the same name, you can use the whatis
command to list the man pages that are available for a specific command or utility. For example:
whatis <command>
This will list the man pages that are available for the <command>
, along with a short description of each man page.
For example, to list the man pages that are available for the ls
command, you can use the following command:
whatis ls
This will list the man pages that are available for the ls
command, along with a short description of each man page.
To view a specific man page, you can use the man
command with the -a
option and the section number of the man page. For example:
man -a <section> <command>
This will display the specified man page in the pager program, allowing you to view the man page one page at a time.
For example, to view the man page for the ls
command in section 1, you can use the following command:
man -a 1 ls
This will display the man page for the ls
command in section 1. You can use the space
key to move to the next page and the q
key to exit the pager program.
You can also use the man
command with the -f
option to display the short description of a man page. For example:
man -f <command>
This will display the short description of the man page for the <command>
.
By using the whatis
and man
commands, you can view overlapping man pages with the same name and choose the man page that you want to view.