Shell history
Most shells keep a history of the commands you’ve run. This means that you can see every successful command that you’ve run just by pressing the arrow keys: the Up-Arrow key to go back one command and Down-Arrow to go forward one. Scrolling through your shell history like this can be very useful, especially if you find that you’re re-running similar commands frequently.
Note that you can also edit commands that you find like this: use Left-Arrow and Right-Arrow to navigate to the line of text that is a command, and just type to edit the command.
An edited command is added to the end of your shell history (it doesn’t actually modify the saved line in the history).
Together, these tricks allow you to easily go back and re-execute or modify previous commands.
Shell configuration files
Some of the tricks we’ll talk about require changes to your shell’s configuration file. The workflow is usually the following...