O'Reilly logo

Learning the bash Shell, Second Edition by Bill Rosenblatt, Cameron Newham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Built-In Commands and Reserved Words

Table 2.3 shows a summary of all built-in commands and reserved words.

Table B-3. Commands and Reserved Words

Command Chapter Summary
! 5Reserved word. Logical NOT of a command exit status.
: 7Do nothing (just do expansions of any arguments).
. 4Read file and execute its contents in current shell.
alias 3Set up shorthand for command or command line.
bg 8Put job in background.
bind 2Bind a key sequence to a readline function or macro.
break 5

Exit from surrounding for, select, while, or until loop.

builtin 5Execute the specified shell built-in.
case 5Reserved word. Multi-way conditional construct.
cd 1Change working directory.
command 7Run a command bypassing shell function lookup.
continue  

Skip to next iteration of for, select, while, or until loop.

declare 6

Declare variables and give them attributes.

dirs 6Display the list of currently remembered directories.
disown 8Remove a job from the job table.
do 5

Reserved word. Part of a for, select, while, or until looping construct.

done 5

Reserved word. Part of a for, select, while, or until looping construct.

echo 4Expand and print any arguments.
elif 5

Reserved word. Part of an if construct.

else 5

Reserved word. Part of an if construct.

enable 7Enable and disable built-in shell commands.
esac 5

Reserved word. Part of a case construct.

eval 7Run the given arguments through command-line processing.
exec 9Replace the shell with the given program.
exit 5Exit from the shell.
export ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required