Open a text editor and paste the following lines to it:
Save the file as “.inputrc” (don’t forget to include the dot at the beginning) in your Home folder.
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 “cd /“.
Note: If you are using zsh, this feature is already included and you can use it without any modification.
Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.
Our latest tutorials delivered straight to your inbox