H
Hype Drip

How to create a man page on linux

Author

David Richardson

Published Mar 29, 2026

The online Reference Manual (man) pages provide detailed descriptions and usage of the commands. You can use the man command to display the man page entry that explains a given command. The syntax of the man command is as follows.

Displaying the Man Pages

For example, display the man pages for the uname command using the man command.

Scrolling Through the Man Pages

The following table lists the keyboard commands for scrolling through the man pages.

Keyboard CommandAction
Space barDisplays the next screen of a man page
ReturnDisplays the next line of a man page
bMoves back one full screen
/patternSearches forward for a pattern
nFinds the next occurrence of a pattern after you have used /pattern
hProvides a description of all scrolling capabilities
qQuits the man command and returns to the shell prompt

Searching the Man Pages

There are two ways to search for information in the man pages:

  • Searching by section
  • Searching by keyword

Searching the Man Pages: By Section

The online man page entries are organized into sections based on the type or usage of the command or file. For example, Section 1 contains user commands, and Section 4 contains information about various file formats. To look up a specific section of the man page, use the man command with the -s option, followed by the section number, and the command or file name.

The table below shows the section numbers of the manual followed by the types of pages they contain.

Section NumberDescription
1Executable programs or shell commands
2System calls (functions provided by the kernel)
3Library calls (functions within program libraries)
4Special files (usually found in /dev)
5File formats and conventions eg /etc/passwd
6Games
7Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8System administration commands (usually only for root)
9Kernel routines [Non standard]

The bottom portion of a man page, titled ‘SEE ALSO‘, lists other commands or files related to the man page. The number in parentheses reflects the section where the man page is located.

Searching the Man Pages: By Keyword

When you are unsure of the name of a command, you can use the man command with the -k option and a keyword to search for matching man page entries.

The man command output provides a list of commands and descriptions that contain the specified keyword. For example, using the man command, view commands containing the syslog keyword.