How to rename your machine

Changing the name of your os could be the first step after initialized you server — at least it works for me. In macOS, the command should be:

sudo scutil --set HostName YOUR-NEW-HOSTNAME

In Linux, this command should be:

sudo hostname YOUR-NEW-HOSTNAME

References

Mac terminal prompt’s machine name becomes “bogon” after using traceroute

Why my macOS shows ‘bogon’