Type in the following commands in order to change the hostname of your macOS computer from the command line.
When entering the commands replace the “name” with the desired computer name.
- scutil –set ComputerName “name”
- scutil –set LocalHostName “name”
- scutil –set HostName “name”
- scutil –get HostName