How to get help for different command in GNU/Linux

As an administrator/user of GNU/Linux you will be working on the command line one or the other time. There are hundreds of commands available in the system and each command has multiple options. Once in a while we need help on these command or sometime we need to find out if there is a command to do something which we want to get done.

The advantage of this knowledge helps you to avoid going to the internet all the time and you can get help on your finger tips immediately.

So lets see what are the different possible way to get help on the command line.

Finding out if there is a command to do a particular job.

As I mentioned there are hundreds of commands available on your system and many a times we do not even know if there is a command to get the our work done.  There is an interesting command in GNU/Linux systems called 'apropos' which unfortunately is a lesser known and under utilized command.

With this command you can find suggestion for different other command that can do the work. You need to pass an word to this command and it lists the commands that are some how associated to that work.

For example you want to find out command for compression you can simply say:

apropos compress

This will give you a list of command which has compress in there description or if they are related to compression.

apropos command usage

Getting basic help on the command itself.

Every command that you use has a basic facility to display a small help about the command, these are usually the options that can be used with the commands.  You can achive this by passing --help argument to the command.

command --help

This will give you a basic options and information about the command.

Commands basic help

Manual pages for the command.

Every command (most of them) when installed on the system are associated with a manual page.  These pages have information about the command and how to use the command.  A manual page for a particular command can be invoked by using the man command

man command
man cat

You can use arrow keys to move around in the man page and to quit press 'q'

Manual Page

You can also do a man man to know more about the man command itself.

Info pages for the command.

Info pages are detailed information about the commands (info page for every command might not be available).  The info command is used just line the man command to get information about a particular command.  The interface of info page allows you to navigate to next and previous pages associated, select the links to go to other sections. In simple terms info pages work like a simple web browser which allows you to navigate to different section of the provided help content easily.

info command
info ls

Info command usage

So these are the interesting ways you can find out about commands and also come to know about them without getting on to the net.

Add new comment

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
Enter the characters shown in the image.
Are you a robot?
"Natraj"  Bungalow,
Colony No.7,  Sr.No. 38.
(Lane Behind Sai Baba Mandir)
Kale Borate Nagar, Hadapsar,
Pune - 411028.
Get Directions