search command in linux history code example
Example 1: command line history search
Ctrl+R
- Start typing a command and the most recent matching command will appear
- Press Ctrl+R again to cycle through results
- Press Enter or Tab to select the result
Example 2: shell search history
sudo add-apt-repository ppa:ultradvorka/ppa && sudo apt-get update && sudo apt-get install hstr && hstr --show-configuration >> ~/.bashrc && . ~/.bashrc