How does the type command Work?

Answer:
It is one of builtin Bash commands. It is used to describe the command and how it would be interpreted if used.

Examples:
Shell: type -p ruby
Return: /usr/bin/ruby

Shell: type -a ruby
Return: ruby is /usr/bin/ruby

Shell: type -t ruby
Return: file

Shell: type -a echo
Return:
echo is a shell builtin
echo is /bin/echo
First answer by David.lt. Last edit by David.lt. Contributor trust: 23 [recommend contributor recommended]. Question popularity: 1 [recommend question].