Linux Basics : Part09 : Running Commands & Getting Help

Commands:
These are words which you type in the command line prompt to execute a pre-written script to accomplish a certain objective.

Syntax:
Commands may be a single word or may have certain syntax. The ones which have a syntax is normally in the pattern of:
#command <options> <arguments>
where each item is separated by space.

Options and arguments are the data required by the command to give you the desired output, which may have parameters for sorting, formatting, extending the actual output of the command and so on.

Getting help with commands:
In Linux you can get help in various ways for a single command, some of them are as below:

  1. #whatis <command>: "whatis" followed by the command you need help with gives a short description of the command in reply.

  2. #<command> --help: In some commands you can use the argument “--help” and receive a detailed description of the commands and the parameters and arguments it supports.

  3. #man <command>: The “man" command is the most commonly used command to get help with commands. It stands for “manual”. This command gives the most detailed description and the help with any command with its entire history.

  4. #info <command>: "Info" command also gives detailed help with commands.

  5. #whereis <command>: There "whereis" command helps you find the location of the command binary and gives the FQPN of the binary. This is helpful for scripting as in places you may have to mention the FQPN for the script to work.

  6. #yum whatprovides <command>: If you don’t have a command and you want to install this command along with the command name will help you get the package name that you need to install to get the command.

Well that’s it for this post, see you in another one of blog.avoidingtech.com

Leave a Comment

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

error: Content is protected !!