Search

type

Display how a command name would be interpreted by the shell.

Synopsis

syntax
type [OPTION]... NAME...

Examples

Show if ls is alias, builtin, or file
type ls
Show all echo types (builtin and /usr/bin/echo)
type -a echo
Print just the type: builtin
type -t cd

Common options

FlagDescription
-aDisplay all locations and types
-tPrint only the type (alias, function, builtin, file)
-pPrint disk file path only, even for builtins

About type

The `type` command display how a command name would be interpreted by the shell. Search commands help you locate files, text patterns, and executables across the filesystem.

Efficient searching is critical when working with large codebases or troubleshooting system issues. These tools range from simple filename lookups to full regular-expression pattern matching across file contents.

The command accepts 3 commonly used flags shown above, though the full set of options is available in the man page (`man type`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Search Commands

Other commands in the Search category

Related tools