Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

CentOS 6.3 / RHEL 6.3

Can someone please explain the difference between the whatis command and the apropos command? I noticed that both appear to be installed by default and I'm not sure what the difference is between them.

share|improve this question
2  
Probably yum provides whatis and yum provides apropos will both list the same man, man-db or similar package. Actually whatis is the same as man -f and apropos the same as man -k. See whether those two switch's description in man man is easier to understand. –  manatwork Mar 24 '13 at 16:47

2 Answers 2

whatis ls lists the manual pages for ls, apropos ls lists all manual pages that contain ls in their title. The first list here gives 2 entries, the second 1385.

share|improve this answer

whatis displays one-line manual page descriptions, intended to give you a general idea of what a program do,

while apropos searches the manual page names and descriptions, intended to help you to learn what program to use when performing a certain job.

Some examples

Say, I want to know what does df program do. whatis gives me answer.

$ whatis df
df (1)               - report file system disk space usage

And now, I want to unzip an archive. apropos gives me some choises for consideration.

$ apropos unzip
bunzip2 (1)          - a block-sorting file compressor, v1.0.6
funzip (1)           - filter for extracting from a ZIP archive in a pipe
gunzip (1)           - compress or expand files
lz (1)               - gunzips and shows a listing of a gzip'd tar'd archive
preunzip (1)         - prefix delta compressor for Aspell
unzip (1)            - list, test and extract compressed files in a ZIP archive
unzipsfx (1)         - self-extracting stub for prepending to ZIP archives
uz (1)               - gunzips and extracts a gzip'd tar'd archive

UPDATE:

Since both whatis and apropos search man database, you can only get info on what's already installed on your system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.