Main index | Section 1 | 日本語 | Options |
If a command specified to the shell contains a slash ‘/’, the shell will not execute a builtin command, even if the last component of the specified command matches the name of a builtin command. Thus, while specifying "echo" causes a builtin command to be executed under shells that support the echo builtin command, specifying "/bin/echo" or "./echo" does not.
While some builtin commands may exist in more than one shell, their operation may be different under each shell which supports them. Below is a table which lists shell builtin commands, the standard shells that support them and whether they exist as standalone utilities.
Only builtin commands for the csh(1) and sh(1) shells are listed here. Consult a shell's manual page for details on the operation its builtin commands. Beware that the sh(1) manual page, at least, calls some of these commands "built-in commands" and some of them "reserved words". Users of other shells may need to consult an info(1) page or other sources of documentation.
Commands marked "No**" under External do exist externally, but are implemented as scripts using a builtin command of the same name.
Command | External | csh(1) | sh(1) |
amp;! | amp;No | amp;No | Yes |
% | amp;No | Yes | amp;No |
amp;. | amp;No | amp;No | Yes |
amp;: | amp;No | Yes | Yes |
@ | amp;No | Yes | amp;No |
amp;[ | Yes | amp;No | Yes |
{ | amp;No | amp;No | Yes |
} | amp;No | amp;No | Yes |
alias | No** | Yes | Yes |
alloc | amp;No | Yes | amp;No |
bg | No** | Yes | Yes |
bind | amp;No | amp;No | Yes |
bindkey | amp;No | Yes | amp;No |
break | amp;No | Yes | Yes |
breaksw | amp;No | Yes | amp;No |
builtin | amp;No | amp;No | Yes |
builtins | amp;No | Yes | amp;No |
case | amp;No | Yes | Yes |
cd | No** | Yes | Yes |
chdir | amp;No | Yes | Yes |
command | No** | amp;No | Yes |
complete | amp;No | Yes | amp;No |
continue | amp;No | Yes | Yes |
default | amp;No | Yes | amp;No |
dirs | amp;No | Yes | amp;No |
do | amp;No | amp;No | Yes |
done | amp;No | amp;No | Yes |
echo | Yes | Yes | Yes |
echotc | amp;No | Yes | amp;No |
elif | amp;No | amp;No | Yes |
else | amp;No | Yes | Yes |
end | amp;No | Yes | amp;No |
endif | amp;No | Yes | amp;No |
endsw | amp;No | Yes | amp;No |
esac | amp;No | amp;No | Yes |
eval | amp;No | Yes | Yes |
exec | amp;No | Yes | Yes |
exit | amp;No | Yes | Yes |
export | amp;No | amp;No | Yes |
false | Yes | amp;No | Yes |
fc | No** | amp;No | Yes |
fg | No** | Yes | Yes |
filetest | amp;No | Yes | amp;No |
fi | amp;No | amp;No | Yes |
for | amp;No | amp;No | Yes |
foreach | amp;No | Yes | amp;No |
getopts | No** | amp;No | Yes |
glob | amp;No | Yes | amp;No |
goto | amp;No | Yes | amp;No |
hash | No** | amp;No | Yes |
hashstat | amp;No | Yes | amp;No |
history | amp;No | Yes | amp;No |
hup | amp;No | Yes | amp;No |
if | amp;No | Yes | Yes |
jobid | amp;No | amp;No | Yes |
jobs | No** | Yes | Yes |
kill | Yes | Yes | Yes |
limit | amp;No | Yes | amp;No |
local | amp;No | amp;No | Yes |
log | amp;No | Yes | amp;No |
login | Yes | Yes | amp;No |
logout | amp;No | Yes | amp;No |
ls-F | amp;No | Yes | amp;No |
nice | Yes | Yes | amp;No |
nohup | Yes | Yes | amp;No |
notify | amp;No | Yes | amp;No |
onintr | amp;No | Yes | amp;No |
popd | amp;No | Yes | amp;No |
printenv | Yes | Yes | amp;No |
printf | Yes | amp;No | Yes |
pushd | amp;No | Yes | amp;No |
pwd | Yes | amp;No | Yes |
read | No** | amp;No | Yes |
readonly | amp;No | amp;No | Yes |
rehash | amp;No | Yes | amp;No |
repeat | amp;No | Yes | amp;No |
return | amp;No | amp;No | Yes |
sched | amp;No | Yes | amp;No |
set | amp;No | Yes | Yes |
setenv | amp;No | Yes | amp;No |
settc | amp;No | Yes | amp;No |
setty | amp;No | Yes | amp;No |
setvar | amp;No | amp;No | Yes |
shift | amp;No | Yes | Yes |
source | amp;No | Yes | amp;No |
stop | amp;No | Yes | amp;No |
suspend | amp;No | Yes | amp;No |
switch | amp;No | Yes | amp;No |
telltc | amp;No | Yes | amp;No |
test | Yes | amp;No | Yes |
then | amp;No | amp;No | Yes |
time | Yes | Yes | amp;No |
times | amp;No | amp;No | Yes |
trap | amp;No | amp;No | Yes |
true | Yes | amp;No | Yes |
type | No** | amp;No | Yes |
ulimit | No** | amp;No | Yes |
umask | No** | Yes | Yes |
unalias | No** | Yes | Yes |
uncomplete | amp;No | Yes | amp;No |
unhash | amp;No | Yes | amp;No |
unlimit | amp;No | Yes | amp;No |
unset | amp;No | Yes | Yes |
unsetenv | amp;No | Yes | amp;No |
until | amp;No | amp;No | Yes |
wait | No** | Yes | Yes |
where | amp;No | Yes | amp;No |
which | Yes | Yes | amp;No |
while | amp;No | Yes | Yes |
BUILTIN (1) | December 21, 2010 |
Main index | Section 1 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology. | ” |
— The Unix Haters' handbook |