How to see whether a command is a executable or a shell builtin.

Posted: February 23, 2017. At: 10:55 AM. This was 6 months ago. Post ID: 10280

The type command for bash will tell you whether a command is a shell built-in or an executable on it`s own. This is very simple to use.

This example shows how it works.

[email protected]:~$ type -a echo
echo is a shell builtin
echo is /bin/echo

The type command itself is a shell built-in, that allows you to tell what a Linux command is. Use the whatis command to get information about a Linux command.

This example shows information about ls.

[email protected]:~$ whatis ls
ls (1)               - list directory contents

The info command is also very useful for reading info pages about various Linux commands.

Using the info command to read about ls.
Using the info command to read about ls.

No comments have been made. Use this form to start the conversation :)

Leave a Reply