WriteBash - In this article, we will learn about the type command, the type command used to display a command’s type.
The type command itself is a builtin shell, which can be executed regardless of the other program.
Type command syntax
The syntax of the type command is quite simple, the syntax will look like this:
$ type command
Here, we’ll try some examples.
linuxmint ~ # type type type is a shell builtin linuxmint ~ # type cp cp is /bin/cp linuxmint ~ # type ls ls is aliased to `ls --color=auto'
The result of the type of commands seems different. According to the previous article, we have about 4 types of commands.
Now that you can see, the
type command returns
type is a shell builtin, which is the builtin type.
cp command returns the result
cp is /bin/cp, which is the type of executable program.
ls, the result is
ls is aliased to `ls --color=auto', you might wonder why it is alias. Do you notice that when you type the
ls command, the files and folders have different colors, thanks to the
ls command on different operating systems may have different aliases. For example, in Linux Mint, alias is
ls --color=auto. The ls command in Fedora, alias is
The type command may be useful in some cases. For example, you need to know that command is using which executable file or which file to link to.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.