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

NameTypeDescription
-toptionPrint category
-aoptionList matching interpretations
nameoperandCommand 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
Linux Reference