It is often the case that you have multiple terminals open on one system. With bash with default settings once you press the up button you can’t see the previous command entered on other terminal but you can see the commands entered on the same terminal. This problem is getting even worst. On default, bash history is  saved only for the last closed session.

Now if you want to save all bash history for all open sessions do the followings: Open the .bashrc file from your home directory and add the lines:

shopt -s histappend export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

Continue Reading…

Page 1 of 11