Name
type
Synopsis
type [-afpPt] commandsShow whether each command name is a Linux command, a built-in command, an alias, a shell keyword, or a defined shell function.
Options
- -a
Print all locations in $PATH that include command, including aliases and functions. Use -p together with -a to suppress aliases and functions.
- -f
Suppress function lookup, as with command.
- -p
If type -t would print file for a given command, this option prints the full pathname for the executable files. Otherwise, it prints nothing.
- -P
Like -p, but force a PATH search, even if type -t would not print file.
- -t
Print a word describing each command. The word is one of alias, builtin, file, function, or keyword, depending upon the type of each command.
Example
$ type mv read if
mv is /bin/mv
read is a shell builtin
if is a shell keywordBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access