Ubuntu – Bash history not saved after closing terminal

bashbash-historyhistoryubuntu-gnome

I recently replaced my Ubuntu 14.04 installation with Ubuntu Gnome (which comes with Gnome DE). But I noticed that bash history is not saved once the terminal session is closed. Once I close a terminal session and open a new one, and run the command history it does not show anything other than the history command itself. Is there any way to solve this issue?

Thank you

Best Answer

It may be that your .bash_history doesn't belong to your user. Check the permissions of the file and if you're not the owner, change it:

sudo chown yourusername:yourusername ~/.bash_history
Related Question