.bash_history does not exist
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.
Related videos on Youtube
Steve Wall
It's a good day when I get to be a geek! Technology has always interested me and the fact I get paid to do it is just an added bonus. I'm competent in areas for enterprise architecture, cloud architecture, and hands on implementation. During my career, I've had the opportunity play many roles including development, architecture, system administration, operations and technical management. For most of my career I've been a consultant. Recently I've been working on Infrastructure-as-Code (IaC) to create VMs and install Cloud Foundry on the major IaaS providers - vSphere, GCP, Azure, AWS. And helping large enterprises implement those solutions. In addition to the build out of PaaS infrastructure, I consult with large enterprise organizations regarding microservices architecture from a holistic perspective as well as the inner working of a given microservice. Addressing various Enterprise concerns such as security, availability, performance, zero down time deployments, etc...
Updated on September 18, 2022Comments
-
Steve Wall over 1 year
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?
-
Naidim over 9 yearsIs your home directory on a read-only AMI or ephemeral storage, and not local SSD or EBS volume?
-
Steve Wall over 9 yearstouch .bash_history did create the file. Which would indicate it is not read only. Correct?
-
-
Steve Wall over 9 yearsUnfortunately 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.