O'Reilly logo

Linux® Command Line and Shell Scripting Bible, Second Edition by Christine Bresnahan, Richard Blum

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

Appendix A

Quick Guide to bash Commands

In This Appendix

  • The bash built-in commands
  • The GNU additional shell commands
  • The bash environment variables

As you've seen throughout this book, the bash shell contains lots of features and thus has lots of commands available. This appendix provides a concise guide to allow you to quickly look up a feature or command that you can use from the bash command line or from a bash shell script.

Built-in Commands

The bash shell includes many popular commands built into the shell. This provides for faster processing times when using these commands. Table A.1 shows the built-in commands available directly from the bash shell.

Table A.1 bash Built-in Commands

Command Description
alias Define an alias for the specified command.
bg Resume a job in background mode.
bind Bind a keyboard sequence to a readline function or macro.
break Exit from a for, while, select, or until loop.
builtin Execute the specified shell built-in command.
cd Change the current directory to the specified directory.
caller Return the context of any active subroutine call.
command Execute the specified command without the normal shell lookup.
compgen Generate possible completion matches for the specified word.
complete Display how the specified words would be completed.
continue Resume the next iteration of a for, while, select, or until loop.
declare Declare a variable or variable type.
dirs Display a list of currently remembered directories.
disown Remove ...

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