Working in AWS I created an instance of Ubuntu 14.04 and noticed the history was not preserved between login sessions. Further investigation showed the .bash_history file did not exist. Why was a .bash_history not created?
1 Answer
There could be many reasons.
For example, you are using a different shell (not bash). You can check/change your shell using chsh
command.
If you are using bash, then here are some ways to disable history in bash you may want to check and re-enable: https://stackoverflow.com/questions/18663078/disable-history-in-linux For example, make sure HISTFILE is set, not empty.
The other reason I could think of is that your home directly does not have proper permissions to create the history file.
-
Unfortunately those suggestions didn't seem to be the problem. I verified I was in bash via "ps". I was able to manually create a .bash_history. And an "env | grep HIST" came up empty. Sep 11, 2014 at 20:19