It is often useful to know exactly which of the four kinds of commands is being used, and Linux provides a couple of ways to find out.
type command is a shell builtin that displays the kind of command the shell will execute, given a particular command name. It works like this:
command is the name of the command you want to examine. Here are some examples:
type typetype is a shell builtin [me@linuxbox ˜]$
type lsls is aliased to `ls --color=tty' [me@linuxbox ˜]$
type cpcp is /bin/cp
Here we see the results for three different commands. Notice that the
ls command (taken from a Fedora system) is actually an alias for the
ls command with the
--color=tty option ...