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'm on ubuntu 10.4 and my shell is bash. When I open several gnome terminals and close them history is properly appended. When I enter shopt it says among other things:

histappend      off

Can anyone tell me where the append behaviour is configured?

share|improve this question
retagging 'ubuntu-10.04-lts' since ubuntu-10.10 isn't out yet. tho i hear it's to be named something Meerkat. – quack quixote May 1 '10 at 17:40
btw, my bash shells on Lucid all show histappend as on ... no tweaks yet ... have you tweaked your bash configuration already? – quack quixote May 1 '10 at 17:45
@quack: Thanks, I'm ahead of my time, as always;-) – Ludwig Weinzierl May 7 '10 at 3:45
@quack: I have upgraded this install several times, so I'm not 100% sure. For me it doesn't matter if histappend is on or off, history is always appended. What I'm really curious about is why this happens? It would be insightful, if you could shopt -u histappend and tell me if it is still appended in your install? – Ludwig Weinzierl May 7 '10 at 3:51

histappend is the setting I would expect to control this. Since those aren't login shells, it won't be something going on in /etc/bash.bash.logout or ~/.bash_logout. Check to see if a trap is set by entering trap -p. Also do echo $PROMPT_COMMAND to see if something is going on there.

share|improve this answer
echo $PROMPT_COMMAND returns echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007". trap -p returns nothing. I have no /etc/bash.logout and ~/.bash_logout contains nothing regaring history. – Ludwig Weinzierl May 1 '10 at 14:35

I wrote a quick tip about setting histappend this on my site but I will paraphrase the post here, to answer your question, I hope.

You should be able to configure histappend to be 'on' by using shopt.

To enable run

shopt -s histappend

To disable run

shopt -u histappend

Does that help?

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.