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 am running ubuntu 12.04, how can I configure my shell/ubuntu so that 'history' commands will display all the previous command from different shells?

Basically, I want to a list of my previous command regardless which shell I enter.

Thank you.

share|improve this question
What shell are you using? The default one for ubuntu is bash. – Darth Android Jul 20 '12 at 17:32
i am using bash. – michael Jul 20 '12 at 23:12
up vote 0 down vote accepted

Change the location of each shell's history file to be the same.

I don't know if that will work if you have multiple, different, interactive shells open -- I know two interactive bash logins will cooperate their usage of the history file. I'd bet the different shells just use standard, cooperative file locking. So they'll probably be just fine. I digress.

eg for bash 'export HISTFILE=/home/someuser/.my_cross_shell_history' and then the parallel for each shell you use.

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.