Forrest logo
back to the type tool

type:tldr:b527e

type: Display all locations containing the specified executable.
$ type -a ${command}
try on your machine

The "type" command in Unix/Linux is used to determine the type of a command or if a command is an internal shell command or an external executable file. When used with the "-a" option, it displays all the locations where that command is found in the user's $PATH.

Now, let's break down the command "type -a ${command}":

  • "type": The command itself.
  • "-a": An option used with the "type" command to display all the locations where the specified command is found.
  • "${command}": A placeholder that is meant to be replaced with the actual command you want to check.

For example, if you want to check the type and location of the "ls" command, you would replace "${command}" with "ls" and the command becomes "type -a ls". This will display all the locations where the "ls" command is found in the $PATH, indicating whether it is a built-in shell command or an external executable.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the type tool