0

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.

sungtm
  • 547
  • 3
  • 12
hinewwiner
  • 627
  • 13
  • 25
  • `HOSTNAME` is automatically set when the shell is started; you shouldn't be setting it manually. Changing it won't affect, for example, the output of the `hostname` command. – chepner Oct 29 '19 at 00:44
  • 1
    Are you sure you are still using `bash`? The default login shell is now `zsh`, which (unsurprisingly) won't use `.bash_profile`. – chepner Oct 29 '19 at 00:44
  • 1
    Duplicate of https://stackoverflow.com/questions/56784894/macos-catalina-10-15beta-why-is-bash-profile-not-sourced-by-my-shell – Litt Oct 29 '19 at 06:51

0 Answers0