This is another quick tip: to search typed history at a bash prompt, hit control-r and start typing a command you used previously. It doesn’t have to start with what is typed, as it returns matches which contain the searched text.

Hit control-r again (while searching), and it will jump back further in history and search with the same text.

Hitting enter when bash finds something will run the command while hitting the arrow keys will allow you to move around and edit the command. The escape key will also exit the search and place the historical command on your command line. To cancel the search entirely, use control-c and you’ll be returned to a clean prompt (although the matching string will be presented above where you’re typing).