1. Open a text editor and paste the following lines to it:
"\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on
2. Save the file as “.inputrc” (don’t forget to include the dot at the beginning) in your Home folder.
3. Now open your terminal. You can type a few characters and use the Up/Down arrow to search the history that begin with the typed character. For example, if you type “
cd /” and press the Up arrow button, it will search your history for commands that start with “
Note: If you are using zsh, this feature is already included and you can use it without any modification.
Our latest tutorials delivered straight to your inbox