macOS: really rename the computer



sudo scutil --set HostName DARKNESS  
sudo scutil --set LocalHostName DARKNESS
sudo scutil --set ComputerName DARKNESS
sudo dscacheutil -flushcache


You can view this article online at:
http://kb.herator.se/index.php/article/macos-really-rename-the-computer