If you use Terminal and are having issues with losing your bash history, then you might want to try this hint.
Open Terminal and type the following command:
sudo chown [username] .bash_history
Type your password when prompted.
That it’s. Now when you close and re-open Terminal your bash history should be saved.
Thanks for this tip. My Terminal was exhibiting that exact behaviour, and I was really scratching my head on that one!
No problem Guy!
Thanks man, I searched and searched to rectify this history problem for over an year. Following this hint, I am able to look back in history of commands on my linux. You dont know how much peace thismeans to me.
gnb
oh ***, your tip prompted me to do an ls -l .bash_history… and it REDIRECTED TO /DEV/NULL !!!
:D lol so yes, thanks for the help, I was at my wit’s end.