Today when I logged into my server via SSH as I have been doing for the past 6 months,. However, I now receive this error message any time I run a command that makes reference to the
$HOME environment variable:
-bash: cd: HOME not set
For instance, running
cd throws this error, yet
cd ~ correctly changes to my users home directory.
I have been searching Google and trying all of the different suggestions for hours and I'm stumped.
I have tried editing the
.profile files to include
export HOME=/home/aUser, but
echo $HOME continues to return empty even after logging out and in.
As far as I know, I have not installed any software on this server in the past few weeks, but have been logging in every few days to check things.
I login to my server with a standard SSH connection string using a private and public key:
ssh -i my-server.pem [email protected]
I am still fairly new to Linux, so bear with me.