What is this Linux command?

Lost in Linux and shell commanding?

There are a number of ways to get information about a particular Linux command. Chances are you are using bash shell which is currently the most popular shell of all types of Linux distributions, therefore in a sense, what you mean by Linux commands are bash commands.

So what are the ways to know more about a particular bash / Linux command?

Let’s take Linux command ls for example

ls is probably the most frequently used linux command for listing files under a particular directory, to know more about the command ls, type:

  1. ls –help
    This would generally lists all possible usages or parameters for this command on the current screen.
  2. man ls / apropos *ls* / man -k ^ls&
    This finds and switches to man(ual) pages concerning ls command. ‘apropos’ or ‘man –k’ searches through all man pages for related information of similar commands on the command or command regular expression. This would come handy if you don’t quite remember the command name.
  3. info ls
    Same as above, but maybe more useful and the viewing / scrolling can be easier. info is usually more complete than man in that man sometimes gets you to refer to info for more information.
  4. help ls
    Finds help topics.
  5. whatis ls
    This outputs a small line of brief description of what this Linux command is for.
  6. whereis ls / which ls / locate ls
    These give the stored locations of the actual program.
  7. type ls
    Presents alias commands defined by the name ‘ls’.
Scroll to Top