I clean installed MacOSX (Catalina) and created and added the following to ~/.bash_profile
export HOSTNAME=USDNE001
Then I tried to close and open Terminal app but I get nothing when I do
echo $HOSTNAME
Not sure why this doesn't work for me. This is a clean install of MacOSX and there is no file called ~/.bash_profile
or ~/.bashrc
or ~/.profile
.