Neha Patil (Editor)

Type (Unix)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In Unix, type is a command that describes how its arguments would be interpreted if used as command names.

Function

Where applicable, type will display the command name's path. Possible command types are:

  • shell built-in
  • function
  • alias
  • hashed command
  • keyword
  • The command returns a non-zero exit status if command names cannot be found.

    The type command was added to the Bourne Shell in 1984 with SVR2 but is not part of the POSIX standard. With a POSIX shell, similar behavior is retrieved with

    command -V name

    In the Korn shell, the command whence provides similar functionality.

    References

    Type (Unix) Wikipedia