Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 apple.stackexchange.com/q/50649/7057 –  glenn jackman May 7 '12 at 14:53
add comment

1 Answer

up vote 1 down vote accepted

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

echo $SHELL 

or

echo $0

or

ps -p $$

Output on method one should be something like

/bin/bash

Method 2 should output should be

-bash

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

HISTIGNORE HISTSIZE HISTFILE

To check these settings use:

echo $HISTSIZE
echo $HISTIGNORE

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
add comment

Your Answer

 
discard

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.