Posted: . At: 10:55 AM. This was 7 years ago. Post ID: 10280
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

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

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.

jason@DESKTOP-G1QN8C6:~$ 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.

jason@DESKTOP-G1QN8C6:~$ 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.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.