Command history
Learn how you can access the commands you ran before.
We'll cover the following...
Using the history
command
Whenever we call a command, Bash saves it in the command history. We can navigate the history by using the up and down arrow keys. Bash automatically types the corresponding command. We just need to press “Enter” to launch it. For example, if we called the cat os-release
command, we will press the up arrow and “Enter” to repeat it.
Command history
The Ctrl+R
shortcut brings up a search over all command history. Press Ctrl+R
and start typing. Bash will show us the last called command that begins with these ...
Access this course and 1400+ top-rated courses and projects.