Sometimes you may type a command incorrectly, causing Linux to display an error message. For example, suppose you typed dat instead of date:
bash: dat: command not found
In such a case, carefully check the spelling of the command and try again. If you notice an error before pressing Enter, you can use the Backspace key to return to the point of the error and then type the correct characters.
Just as a web browser
keeps track of recently visited sites, the
shell keeps track of recently issued commands in what’s known
as the history list. You can scroll back through
bash’s history by using the Up arrow key,
or back down using the Down arrow key, just as you would with the
Back and Forward buttons on a web browser. To reissue a command,
scroll to it and press Enter. If you
like, you can modify the command before reissuing it. When typing
shell commands, you have access to a minieditor that resembles the
DOSKEY editor of MS-DOS. This minieditor lets you revise command
lines by typing key commands. Table 7-1 summarizes
some useful key commands interpreted by the shell. The key commands
let you access a list of the 500 most recently executed commands,
saved in the
Table 7-1. Useful Editing Keystrokes
Move back one command in the history list.
Move forward one command in the history list.
Move back one character.
Move forward one character. ...