In computing, ashell builtin is acommand or afunction, exposed by ashell, that is implemented in the shell itself, instead of an externalprogram which the shell would load and execute.[1][2][3][4]
A shell builtin starts faster than an external program because there is no program loading overhead. However, its implementation code is in the shell program, and thus modifying it requires modifying the shell. Therefore, a shell builtin is usually only used for simple, almost trivial, commands, such as text output.
Some commands must be implemented as builtins due to the nature of theoperating system. Notably, thecd command, which changes theworking directory of the shell is often a builtin since a program runs in a separateprocess and working directory is specific to each process. Runningcd as an external program would not affect the working directory of the shell that loaded it.[5]
Thisoperating-system-related article is astub. You can help Wikipedia byadding missing information. |