Possible Duplicate:
Preserve bash history in multiple terminal windows
Can I easily search my history across many screen windows?

I rely on my shell history a lot, I use Ctrlr and arrow keys and I grep through it often.

The problem with with history is if you have more than one session, like if you are using tmux or screen or you open multiple terminal windows or tabs, you would lose all your history except the one you close last.

I thought, there should be a solution for this, I bet others had the same problem and either they use a replacement for history or use a tool to manage history properly.

marked as duplicate by jasonwryan, Kevin, Michael Mrozek Jan 24 '12 at 21:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.