type command

The type command in Linux is used to find out how a command that you enter will be interpreted – as a built-in command, external command, or an alias. The syntax of this command is:

type [OPTIONS] COMMAND

For example, to find out whether pwd is a built-in command, external command or an alias, use the type pwd command:

type command example

In the output above you can see that the pwd command is a built-in shell command. What about the ls command?

type command alias

You can see that the ls command is an alias for ls –color=auto.

To get more information about a particular command, use the -a option:

type command a option

Subscribe to our Newsletter

Like us on Facebook

top
Geek University 2019