Ctrl+R to search in your terminal
You may have already known that the log of the commands you use in your terminal are kept in history.
If you open your terminal and type
$ history
it will display the list of commands you currently have in your history.
However, if you’re anyone like me who can’t remember the exact syntax of certain bash commands you need that history to go as far as possible. By default bash keeps only the last 500 lines.
The good news is that you can extend this number by adding the following lines to your .bash_profile
or .bashrc
file.
HISTFILESIZE=1000000000
HISTSIZE=1000000
HISTSIZE
is the number of entries in the history file stored in your current bash session memory.
HISTFILESIZE
is the number of lines in the history file.
That’s it. I hope you enjoyed this quick tip!