man
man linux command cheatsheet by Thamizhiniyan C S
Introduction
The man
command is used to display the command / program's documentation / manual page.
Syntax
Sections of the man page
Section | Contents of the section |
---|---|
| User commands |
| Programming interfaces for kernel system calls |
| Programming interfaces to the C library |
| Special files such as device nodes and drivers |
| File formats |
| Games and amusements such as screen savers |
| Miscellaneous |
| System administration commands |
Important Flags
Flag | Description |
---|---|
| Display a concise one-line description of the command. |
| Search for commands related to a given keyword. |
| Display all matching manual pages for the specified command. |
| Move forward one page in the manual. |
| Move forward one line in the manual. |
| Move backward one page in the manual. |
| Quit the manual viewer. |
Examples
Command | Description |
---|---|
In the man command manuals, sections are used to categorize different types of information. You can specify a section number to display only the relevant section of a manual. | |
One may not be able to remember the sections in which a command is present. So this option gives the section in which the given command is present. | |
This option helps us to display all the available intro manual pages in succession. | |
The -k option in the man command allows you to search for a command as a regular expression across all manual pages, returning a list of matching entries along with their section numbers. | |
The -w option in the man command returns the location of the manual page for a given command. This is useful for finding where the manual pages are stored on the system. | |
The -I option in the man command makes the search case-sensitive, ensuring that the command name is considered with exact case. | |
To view the Manual for “cd” Command Using man Command | |
Searching for Commands Related to “file” Using man Command | |
To Display a One-Line Description of “ls” Using man Command |
Last updated