Bash history is a very useful command especially for older people who their memory betray them :). So increasing bash history sometimes can be very helpful. Usually default value is 1000 , so let’s see how to increase it.

Type the following command to show current value

env | grep HIS

Then open  .bash_profile file usually at /home/yourusername/ to make a small modification

nano nano .bash_profile

add a line before path (usually before end of file) , the value must be greater than 1000 which is the default value, according to your needs, let’s double it

HISTSIZE=2000

modify export PATH to

export PATH HISTSIZE

and save it. To read the new value just type

source .bash_profile

To ensure that you have you make it all correct just type

env | grep HIS

and mention the new HISTSIZE value.

That’s it.