Are you looking for a command that you used recently? Do you want to avoid the need to write long commands over and over again despite you used them recently? Are you looking for a tool that is able to manage your favorite commands?
HSTR is a command line utility that brings improved BASH command completion from the history. It aims to make completion easier and more efficient than Ctrl-r.
Apart to the completion, history can be managed (you can remove commands that e.g. contain sensitive information like passwords) and bookmark your favorite commands.
Install htsr on ubuntu
Open the terminal and run the following commands
sudo add-apt-repository ppa:ultradvorka/ppa
sudo apt-get update
sudo apt-get install hh
You can also check optional the configuration from here