In this tutorial we will learn, simple method to find the keyword in all available man pages in Linux / Unix system. First we have to be confirm that man command is installed.
Abbreviation of man page is manual page. It is a software documentation in Unix like operating system. Generally in many Linux distro, man pages are located at /usr/share/man .
You can also use whereis man command to get the path of man pages in system.
To read the man page of command/terminology , use the below given command
NOTE: We have written this post exclusively with man command. There are also other command which help you to find the man pages by searching with keyword
Search keyword in all available man pages
To search the keyword or string in all available man pages in Linux / Unix system, we can use option called -k
man -k keyword
For example, we want to search for keyword called vsftpd. We will use the below given command
root@tuxworld:~# man -k "vsftpd" vsftpd (8) - Very Secure FTP Daemon vsftpd.conf (5) - config file for vsftpd root@tuxworld:~#
From above command, we got two results vsftpd and vfstpd.conf . It means vsftpd keyword found in two available man pages.It can be read by below given two commands.
man vsftpd and man vsftpd.conf
Lets take another example. This time we will search for keyword called dhcpd.
In my system, now I will check the keyword dhcpd in man pages. The result may vary system to system.
root@tuxworld:~# man -k dhcpd dhcpd (8) - Dynamic Host Configuration Protocol Server dhcpd.conf (5) - dhcpd configuration file dhcpd.leases (5) - DHCP client lease database udhcpd (8) - The Swiss Army Knife of Embedded Linux udhcpd.conf (5) - udhcp server configuration file root@tuxworld:~#
Now you can see in above given output,we have 5 results (dhcpd, dhcpd.conf, dhcpd.leases, udhcpd, udhcpd.conf)
Using -K option
When we use -K (Capital letter) with man command.It shows the result but not exactly like as we have seen with -k (small letter) .
It will display the result by directly opening the man page.To close this page hit the key q from your keyboard.Then hit enter.
If there is another manual page in system has this keyword, it will automatically open up. Then again you have close that man page by hitting q key
It will go likewise till all man pages are opened by user. To close this search, use CTRL + c (Combination of CTRL and C key) from your keyboard
See the animated GIF example, for explanation :
(Read this post, Convert video file into gif file through command line in linux )