Name
type
Synopsis
type [-afpPt] commands
Show whether each command name is an external 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 printfile
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 iftype -t
would not printfile
.-t
Print a word describing each command. The word is one of
alias
,builtin
,file
,function
, orkeyword
, 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 keyword
Get bash Quick Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.