Skip to main content
Tweeted twitter.com/StackUnix/status/1169082760738344970

I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.

I want a history that:

  • Remembers everything from every terminal
  • Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up)
  • Doesn't forget random thingscommand if there are spaces at the front of the command.

Anything I can do to make bash work more like that?

I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.

I want a history that:

  • Remembers everything from every terminal
  • Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up)
  • Doesn't forget random things if there are spaces at the front of the command.

Anything I can do to make bash work more like that?

I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.

I want a history that:

  • Remembers everything from every terminal
  • Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up)
  • Doesn't forget command if there are spaces at the front of the command.

Anything I can do to make bash work more like that?

Post Merged (destination) from unix.stackexchange.com/questions/48111/…
Post Merged (destination) from unix.stackexchange.com/questions/25334/…
better title, courtesy of Sunny (http://unix.stackexchange.com/questions/25334/how-to-preserve-bash-history-in-multiple-terminal-windows)
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

Better Preserve bash history in multiple terminal windows

Source Link
Oli
  • 16.4k
  • 11
  • 44
  • 51

Better bash history

I consistently have more than one terminal open. Anywhere from two to ten, doing various bits and bobs. Now let's say I restart and open up another set of terminals. Some remember certain things, some forget.

I want a history that:

  • Remembers everything from every terminal
  • Is instantly accessible from every terminal (eg if I ls in one, switch to another already-running terminal and then press up, ls shows up)
  • Doesn't forget random things if there are spaces at the front of the command.

Anything I can do to make bash work more like that?