How to make bash (Terminal.app) remember history of previous sessions? 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 10.6.8 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?
You'll need to tell bash where to keep your history file, and how many lines to keep:

# Set the location of your HISTFILE
echo "export HISTFILE=/Users/&lt;USERNAME&gt;/.bash_history" &gt;&gt; ~/.bash_profile

# Number of lines to keep (1000 in this example)
echo "export HISTFILESIZE=1000" &gt;&gt; ~/.bash_profile

# Set how many commands to keep in the current session history list
echo "export HISTSIZE=80" &gt;&gt; ~/.bash_profile

# Ignore commands that start with a space
echo "export HISTIGNORE=\"&amp;:[ ]*:exit\"" &gt;&gt; ~/.bash_profile