Using the Linux “Whatis” and “Man” Commands

Saying the Linux and Unix shell commands are not intuitive is an understatement of epic proportions.  It might be easier to learn Klingon.  There is help for finding out about the Linux and Unix commands however, and it is found in the unassuming commands, whatis and man.  The syntax for whatis couldn’t be simpler:  whatis name_of_command.   Type in the command string in your terminal, press Enter, and you will get a one line description.  Here is an example of using whatis to find out about the command sudo:

whatis-sudo Using the  Linux "Whatis" and "Man" Commands Discussions How To Linux Tips Uncategorized

Here is another example of using whatis to find out about the command grep (Note too, that in this example, whatis has added several related commands to its response “file pattern searcher”):

whatis-grep Using the  Linux "Whatis" and "Man" Commands Discussions How To Linux Tips Uncategorized

Though I have not found a need to do this, there is another command to get the same information as whatis. You can use this string at the command prompt:  man -f name_of_command.  Here is an example of using this alternate command string to find out about grep:

man-f-grep Using the  Linux "Whatis" and "Man" Commands Discussions How To Linux Tips Uncategorized

If you need more information on a particular command, not to worry.  Deep in the bowels of your installed Linux, Unix, or OSX operating system are many text manuals.  Here is the syntax for accessing a manual page(s) for your command in question:  man  name_of_command.  Staying with our example, let’s say you want to know more about grep.  Using the man command, at the prompt type:  man grep, and press Enter.

grep-man Using the  Linux "Whatis" and "Man" Commands Discussions How To Linux Tips Uncategorized

See the Red Arrow at the bottom of the page.  The Arrow is pointing to a colon and a white bar.  This is telling you that there are more pages about the subject command.  Pressing Enter will take you to the next page.

Whatis and man are my first two resources when I come across a command that I don’t know at all, or all that well.  When you find yourself in that same spot, give these two commands a try.

For more information about these commands, click the following articles:

Linux and Unix whatis command

The man command

 

 

 

 

 

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.