[Linux / Mac] While typing the command in the terminal, you can easily use the “Up” arrow to get it to show the last typed command. What if you want to search for a command that you typed last week?
The solution is simple. Simply press the keyboard shortcut “Ctrl + R” and you can search for your command history.
You can search any part of the command and it will find the match from your command history. Once you have located the command you want, press “Enter” to run it.