type, which and whereis (Display Command Information)
![](/_next/image/?url=https%3A%2F%2Fstatic-staging.d-libro.com%2F01-course-content-images%2F2011-10-Linux-Introduction%2F010-main-figures%2Ftype-which-and-whereis-display-command-information-id201110060410.webp&w=1920&q=75)
There are several Linux commands that give you information about Linux commands besides the man
command.
type – displays the type of a command
The type
command returns types of commands. There are largely three types.
- Shell built-in command (internal command)
- External command (shell refers to the path of a command when it executes it)
- Alias
Here are examples of the three types.
type echo
echo is a shell builtin
type find
find is /usr/bin/find
type ll
ll is aliased to `ls -alF'
which – displays the path of a command
The which
command gives you a file path of a command.
which sort
/usr/bin/sort
whereis – displays path of a command and related documents of the command
The whereis
command is similar to the which
command but gives you more information.
whereis sort
sort: /usr/bin/sort /usr/share/man/man1/sort.1.gz