Differentiate Linux built-in commands from external commands

Source: Internet
Author: User

Linux commands have internal commands and external commands, and internal commands are basically the same as external commands, but with subtle differences

  Internal Command : part of the shell program

Typically, the shell is loaded and resident in memory when the Linux system is loaded, and internal commands are written in the Bashy source code, which executes faster than the external command.

Because parsing the internal command shell does not need to create a child process

such as: Exit CD echo History

  external Command : Utilities section of Linux system

Because utility functions are generally powerful, the amount of programs involved can be large, and will not be loaded in memory with the system when the system is loaded, but only when it is required to be transferred into memory.

Normally external command entities are not included in the shell, but their command execution procedures are controlled by the shell,

The shell program manages the path lookup for external command execution, loads the store, controls the execution of commands, and is installed outside of bash.

You can use type command to tell whether an internal command or an external command

[[Email protected] account]# type cd

CD is a shell builtin

Differentiate Linux built-in commands from external commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.