All rights reserved, please indicate the source when citing
type - Display Command Type
The type command is used to display the type of a command, showing whether it's an alias, an executable, a shell built-in, or another type. It's a helpful utility for determining the nature of a given command.
The basic syntax of type is:
type [OPTIONS} COMMAND .
"COMMAND" is the command whose type you want to determine.
Common options for the type command include:
- -a:Show all information about the command, including whether it's an alias, executable, shell built-in, etc.
- -t:Display only the type of the command.
Eamples:
$ type -a type
type is a shell builtin
$ type -a vi
vi is aliased to `vim'
vi is /bin/vi
|
In the first example, type is shown as a shell builtin. In the second example, vi is an alias for vim, and it's also found as an executable in "/usr/bin/vi".
For more type command parameters and usage examples, please refer to the provided link.