Getting Help in Linux
When using Linux, you’ll often come across commands that you don’t fully understand or have never seen before. Instead of guessing, you can use built-in tools to find help. Here’s how:
- Using the man Command (Manual Pages)
Every Linux command has a manual (man page) that explains what it does and how to use it.
How to use it:
man <command>
Example: To see the manual for the ls command (which lists files and folders):
man ls
The manual will show details about the command, including available options and examples.
2. Using the —help Option
Most Linux commands have a —help option, which gives a quick summary of how to use them.
How to use it:
<command> --help
Example:
ls --help
This will display a short description of the ls command and a list of its options.
3. Using the -h Option (Short Help)
Some commands, like curl, use -h instead of —help for short help.
How to use it:
<command> -h
Example:
curl -h
This will show a quick summary of available options for curl.
4. Using the apropos Command
If you don’t remember the exact command but know a keyword related to it, you can use apropos to search for commands.
How to use it:
apropos <keyword>
Example:
apropos sudo
This will list all commands related to sudo along with short descriptions.
5. Using Online Tools
If a command is too complex, you can use online tools like explainshell.com to break it down.
How to use it:
- Go to https://explainshell.com/
- Copy and paste a command into the search bar.
- It will explain each part of the command in simple terms.