Internal External Command

Do you know when you run the Linux / Unix command it could be Internal or External ? In this article, we will learn about Linux Internal and External command. For identifying and understand on command type, here we have article for you.

Linux/Unix has so many commands. If you know these commands, your Linux work will be much more easier and faster.

In this post we have tried to provide the difference between Internal and External command in a simple manner.

Difference Between Linux Internal And External Command

In Linux, generally commands are categorised into two types – Internal Command and External Command.

We have simplify the difference between the two types of command in given below table.

Internal CommandExternal Command
Internal commands are shell built-in commands.External commands are other than shell built-in command.
It doesn’t need to be set in PATH variable.We have to set the PATH variable for External commands.
Do not require any process to spawn on execution.It require process to be spawned when it get executed.
Example: cd, source, fg, echo

Example: ls,cat.
Difference between Internal and External Command

How To Identify Internal Or External Command

In above section, we read about the difference between Internal and External Command. But as a user, how can we identify the command type.

For identifying the Internal and External command, we will use the command called type .

We have already written about type command in detail, you must be interested to read this post – “type command : display information about command type on Linux

For a quick check, use this Syntax

type [argument] [command name]

For example, let’s check if cd command is Internal or External

user1@server01:~$ type cd
cd is a shell builtin
user1@server01:~$

The above output shows that cd command is Internal Command means Shell Built-in . Try the same type command to identify other commands.

What is builtin Linux/Unix command?

The builtin or shell builtin or Internal command , all have same meaning. The builtin commands are the command which are available in Shell by default.

How to check PATH variable value ?

To check the PATH variable value , run the command echo $PATH in current user shell means when you run the command in terminal it shows the PATH value for current login user in terminal.

Conclusion

In this article, we have described the difference between Linux/Unix Internal and External command. This article will help to enhance the knowledge on Linux Command Line system.

Read Some More Articles

Leave a Reply

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