Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

the default size of history in Ubuntu is 1000 but it's too narrow,I want to change it to 10000, So I append export HISTSIZE=10000 export HISEFILESIZE=10000 to .bash_profile(it actually is .profile in 12.04), and 'source' it source .profile then I input echo $HISTSIZE echo $HISTFILESIZE 1000 was displayed for both,but I reboot my computer it went 'default' How it doesn't work?

share|improve this question

1 Answer 1

I tried the same thing, only to discover that sneaky Ubuntu sets these variables in ~/.bashrc by default, which is executed instead of ~/.profile for non login shells such as just opening a terminal window. Changing these lines in ~/.bashrc fixed it for me:

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
share|improve this answer
hisfilesize is in KB? –  duckx Jul 31 '14 at 14:21
@duckx No, HISTFILESIZE is in number of line stored in the history file, while HISTSIZE is the number of line stored and available by each shell process (and then saved to HISTFILESIZE). Note that with no value (or non-number, or negative), then no limiting occurs. –  vaab Jan 23 at 2:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.