Skip to content

How to Increase the size of the Bash history

In this, tutorial you will learn to adjust the size of the Bash history. The default size of history in Ubuntu is 1000 and it might be too small for some. So we are going to change it to 10000 in this tutorial.

Let’s open your .bashrc file and find the section similar to the below image:

So we are trying to make the Bash shell remember 10,000 typed commands in the current session (HISTSIZE), and 10,000 commands in the history file called .bash_history (HISTFILESIZE). So let’s update the value to 10000 and 10000 respectively.

After modifying ~/.bashrc file, execute the following command to apply changes:

source ~/.bashrc

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments