When working with multiple terminals you can always face ssh timeout which will result in loss of command history of the particular session.
To prevent this, Add below line in "/etc/bash.bashrc" file
export PROMPT_COMMAND='history -a'
After logoff login, every time a shell command runs it will be immediately stored in history file.
That should do the trick!!!
To prevent this, Add below line in "/etc/bash.bashrc" file
export PROMPT_COMMAND='history -a'
After logoff login, every time a shell command runs it will be immediately stored in history file.
That should do the trick!!!