In computing, a shell builtin is a
command or a
function, exposed by a
shell
Shell may refer to:
Architecture and design
* Shell (structure), a thin structure
** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses
Science Biology
* Seashell, a hard outer layer of a marine ani ...
, that is implemented in the shell itself, instead of an external
program which the shell would load and execute.
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 the
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
.
Notably, the
cd
command, which changes the
working directory of the shell is often a builtin since a program runs in a separate
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
* Business process, activities that produce a specific s ...
and working directory is specific to each process. Running
cd
as an external program would not affect the working directory of the shell that loaded it.
See also
*
*
References
External links
List of special shell builtin commands
Command shells
{{Operating-system-stub