Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have MacOSX but this should be *NIX-generic.
In my computer at work, my bash shell remembers history from previous sessions, even if I just opened a new terminal.
In my computer at home, this doesn't happen.
I have the same OS in both machines and I don't have any history related setting in .bash_profile.
How could I set this up on my home computer so it remembers history across sessions?

share|improve this question
also asked at – glenn jackman May 7 '12 at 14:53
up vote 1 down vote accepted

Please ensure that you are running bash at home. This can be done with the following

echo $SHELL 


echo $0


ps -p $$

Output on method one should be something like


Method 2 should output should be


Method 3 should output some process with BASH in it.

If you are truly running bash there should be a .bash_history file under your home folder. Your user account might not be setup properly if you are not receiving a history.

Some environmental options to consider


To check these settings use:


To update use:

export HISTSIZE=9000

If you are not using BASH as your shell you can mod your account (if you have privs) by:

usermod -s /bin/bash <username>
share|improve this answer

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.