How To Get Information on Linux
Gregg
The manpages are historically the place to go for any information about the software and utilities installed on a Linux machine. I believe that the info page seems to be the best place for newbies to go because it is so much easier to navigate, and, like manpages, it is a still a great place to get information about your system.
Suppose you want to get information about socket. You would type:
$ info socket
and you’d get a page that looks similar to a manpage but it can be navigated by using keyboard shortcuts:
q- exits back to the shellu- moves up one leveln- moves to the next node on the current levelp- moves to the previous node on the current levelspace- goes to the selected node under the cursorH- lists all of the Info commands
The commands whatis and whereis are also very useful in finding information on the system.
$ whatis printfprintf (3) - formatted output conversionprintf (1) - format and print data
The whatis command will list the set of manpages for a specific keyword. The keyword printf is used in the bash shell as well as the c programming language. Here you see separate pages for each usage. To view them you would specify the section number in your command to man, i.e., $ man 3 printf or man printf (which defaults to section 1). This is the same output as entering $ man -f printf.
The whereis command will list which system files reference a specified keyword or command. For example,
$ whereis socketsocket: /usr/man/man7/socket.7.gz /usr/man/mann/socket.n.gz /usr/man/man2/socket.2.gz$ whereis printfprintf: /usr/bin/printf /bin/printf /usr/man/man3/printf.3.gz /usr/man/man1/printf.1.gz
In case you aren’t really sure of what you’re looking for you can use a ‘keyword’ search to the man or apropos commands which will use the keyword you enter as a regex (regular expression) to find all of the matches throughout the manpages:
$ man -k printfaa_printf (3) - print text to AA-lib output buffers.asprintf (3) - print to allocated stringber_printf (3) - OpenLDAP LBER simplified Basic Encoding Rules library routines f...BIO_printf (3) - formatted output to a BIOBIO_snprintf (3) - formatted output to a BIOBIO_vprintf (3) - formatted output to a BIOBIO_vsnprintf (3) - formatted output to a BIObuffer_printf.c (3) - Buffer management functions.curl_mprintf (3) - formatted output conversiondprintf (3) - formatted output conversionformat (n) - Format a string in the style of sprintffprintf (3) - formatted output conversionetc...
In case you are interested, the manpages are broken down into different sections as listed here:
1 General Commands2 System Calls and Error Numbers3 C Libraries3p perl4 Devices and device drivers5 File Formats and config files6 Game instructions7 Miscellaneous information8 System maintenance9 Kernel internals