commands
type — identify a shell command
Bash builtin that explains how a command name is interpreted. Use -t for a category (alias, keyword, function, builtin or file) and -a for alternatives.
Formal Syntax & Structure
linux syntaxlinux
type [-a] [-t] name ...Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -t | option | Print category |
| -a | option | List matching interpretations |
| name | operand | Command name |
Return Value
text and exit status
Reports command kind or description; zero when all names are found.
Working Example
Example Snippetlinux
type -t cdtype -t ls