next up previous contents
Next: The Bash shell's basic Up: How to use your Previous: Linux shells   Contents

Discovering the Bash shell

A few commands.

Bash makes the capture of your command lines easier.

For example, using the keyboard, you have:

Ctrl + A directly goes back to the beginning of the line.

Ctrl + U erases the current line.

Ctrl + C stops the current task.
You can use the semicolon to type several commands on the same line. The up and down arrows enable you to navigate through the command history. To reach a particular command without having the whole history scroll, type:

history
The list of the commands which are present in the history is displayed with a number next to each command. To execute a particular command, type:

! command_number
Note that:

!!
enables you to re-execute your last command.

Under Unix, the programs and commands' names are sometimes long. Fortunately, Bash can complete names. In fact, just by pressing the [TAB] key, you can complete the name of a command, a program or a directory. For example, let's imagine that you want to use the bunzip2 uncompression program. Type:

bu
then press the [TAB] key. Nothing happens because there are several possible ways of completing the command.

Press the [TAB] key once again: Bash gives you all the occurences of names beginning with "bu".

For example, you have:

  $ bu buildhash builtin bunzip2

Type:

n
(bunzip2 is the only name whose third letter is an "n") and press [TAB]. The shell completes the name and all that remains is to press the "Enter" key!


next up previous contents
Next: The Bash shell's basic Up: How to use your Previous: Linux shells   Contents

1999-01-27