There’s a command I often use in my shell calling
bck-i-search. It allows you to search in your history a command already executed in your shell.
You’ve got two ways:
ctrl+r in your terminal and you’ll open
bck-i-search. Type a word and the command will find you one line. If you want to go deeper in history, use again
ctrl-r and if you want to use the forth way, use