1

I've noticed this pretty much ever since I started using Unix systems many years ago, and never bothered to figure out why, abut now I am.

When I use terminal, and I want to use history to see a history of commands I've executed, it generates a list, but when I open a new shell while on the existing tab, when I execute history in the new tab, it's missing the last X commands, where X varies.

I am wondering why this is, and if it's possible for the new tab to have the same history as the tab it was opened from?

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
anonuser01
  • 159
  • 1
  • 7
  • 1
    You need to set the shell to save history as it goes. They are often configured to only save on exit. They also only load the history on start. – ctrl-alt-delor Feb 11 '22 at 09:48
  • see also [Preserve bash history in multiple terminal windows](https://unix.stackexchange.com/questions/1288/preserve-bash-history-in-multiple-terminal-windows) – steeldriver Feb 11 '22 at 13:11

0 Answers0