The Bourne Again shell (bash) gets its name from the Bourne shell, on which it is based. Developed by Brian Fox and Chet Ramey, bash supports Bourne shell commands and incorporates features from two other shells, C shell and Korn shell. The Bourne Again shell is popular for its programming power and easy-to-use command interface.
You can customize a bash session by changing the command line prompt. The following bash features help users enter commands quickly and efficiently.
Feature... |
Explanation... |
Command line completion |
bash can complete a command without your typing the entire command. This is useful when you forget the name of a command or program, or when the command name is long. |
Command history |
bash keeps a history of commands you enter so that you can scroll through commands and reuse or change command line text that you entered previously during the shell session. |
Wildcards |
bash lets you use wildcards in your commands, which makes typing commands faster. For example, you can use the asterisk wildcard (*) to list all files with a .txt extension, ls *.txt. |
Aliases |
you can specify commands using command aliases. This saves time when you frequently have to type a long command. Aliases let you customize command names to the command syntax you want. For example, users who are familiar with DOS commands can rename equivalent Linux commands using DOS command names. |
Redirecting Input and Output |
commands require input so the shell can perform the command and return the output. For example, typing the Sort command, and pressing ENTER, moves the cursor to the next line and bash waits for input to sort. If you type a list of items to sort, and press CTRL+D (to indicate you are finished typing the input), bash reads the input, sorts the items entered, and displays the results, or output. You can redirect both input and output. |
Combining commands |
you can combine commands using pipes. You can use the output from one command as the input for a second command, and then use the output from the second command as the input for the third command. You can repeat this process for as many commands as you require. |