Bootstrap FreeKB - Linux Commands - man (view manual for a command)
Linux Commands - man (view manual for a command)

Updated:   |  Linux Commands articles

The man command can be used to view the manual page for a command. The man command without any options will ask you which manual page you want to view.

[root@server1 ~]# man
What manual page do you want?

 


View man page

The man command followed by a command will display the manual for the command if one exists. In this example, the manual page for the ls (list) command will be displayed.

[root@server1 ~]# man ls

 


Short description

The -f or --whatis option can be used to view a short description of the man page. In this example, a short example of the pwd command is displayed.

[root@server1 ~]# man -f pwd
pwd (1)      - print name of current/working directory

 


Keyword search

The -k or --apropos option can be used to search the man pages with a certain keyword. This will only search the NAME  section of the man page. In this example, man pages that contain keyword printing in the NAME section are listed. It is noteworthy that popular printing commands, such as lp and lpr are not included in the out, because the NAME section of the lp and lpr commands do not contain the keyword printing.

[root@server1 ~]# man -k printing
pam_echo (8)  - PAm module for printing text messages
pr (1)        - convert text files for printing
spkac  (1ssl) - SPKAC printing and generating utility

 

The -K or --global-apropos options can also be used to search the man pages with a certain keyword. This will search the entire man page. In this example, man pages that contain keyword usb are listed. This will produce an interactive prompt, where you can view the man page, skip the page, or quit.

[root@server1 ~]# man -K usb
--Man-- next: dracut(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: fxload(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
--Man-- next: lsscsi(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
. . .

 


More

There are many additional options with the man command. Use the man man command to view the man page manual.

[root@server1 ~]# man man

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9888a8 in the box below so that we can be sure you are a human.