8 ways to get help on the Linux shell

Whenever we start using a new software or a new operating system, the interface and the environment with which we are used to also changes. Sometimes, the new environment is user-friendly and we do not find it difficult to interact with. But at times, the new environment is so complex and strange for us that we find ourselves completely clueless. In this situation, we need someone to guide us or some kind of help from the new environment that can lead us towards our goals. For this purpose, almost every software or OS that we find out there comes with some sort of built-in help to facilitate the naive and inexperienced users. If we talk about Ubuntu terminal or Command line interface, then it also provides us with numerous ways to get help.

How to get Help while Working on the Shell

The ways to get help from Ubuntu terminal or Command line are listed below:

Use the command options –h or –help

If you don’t know how to use a command i.e. you don’t know about its parameters and return type etc, then you can make use of –h or –help command.

How to use –h or –help?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the taskbar. Simply type your command whose usage you to know in the terminal with –h or –help after a space and press enter. And you’ll get the complete usage of that command as shown below.

Use tab completion on the Shell

If you do not know the exact name of a command, then you can make use of tab completion.

How to use tab completion?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the task bar. Just type the command name that you know in the terminal and then press tab twice as shown below.

Tab completion on Linux Shell

Unknown Commands

If you want to use a command, but you do not know whether it’s installed on Ubuntu or not or if it does exist, you do not know the package containing it, even then you can use that command.

How to use an unknown command?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the taskbar. Just type the command in the terminal anyway and press enter. Your terminal will tell you whether it’s installed or not or if it is installed then in which package it exists. This is shown below.

Unknown command on Linux

The help command

This is the command which is used for listing all possible commands that are pre-installed in Ubuntu.

How to use help comm

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the task bar. Simply type help in the terminal and press enter key. This is shown below.

Linux Help Command

The man command or man pages

Man is used when you want to get a detailed manual of a command.

How to use man command?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the task bar. Just write man in the terminal and after a space, write the name of the command whose manual you want and press enter. This command works as shown below.

Linux man command

Example: Run the command

man bash

to get extensive help on the Linux bash shell.

The info command

Some commands do not have their manuals or written or they are either incomplete. To get help with those commands, we use info.

How to use info?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the task bar. Just type info in the terminal and with a space, type the name of the command whose manual does not exist and press enter. This is shown below.

Example:

info bash

The apropos command

This command is used along with another command to search for all the man pages in which the latter command exists.

How to use apropos?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the task bar. Just type apropos in the terminal and after a space, type the name of the command whose appropriate man pages you want to find and press enter. This is shown below.

Linux apropos command

The whatis command

This command is used with another command just to show a one liner usage of the latter command from its manual. It’s a quick way of knowing the usage of a command without going through the whole manual.

How to use whatis?

Launch the terminal by pressing Ctrl+ Alt+ T or just click on the terminal icon in the task bar. Just type whatis in the terminal and after a space, type the name of the command whose one liner description you want and then press enter. It is shown below.

Linux Whatis command

By using any of the ways that are listed above, you can get appropriate help from Ubuntu terminal or Command line whenever you find yourself in trouble while using it.

8 Ways To Get Help On The Linux Shell