MacOS – modify hostname from Terminal.
- May 23rd, 2012
- Posted in Documentation
- Write comment
You can use the scutil command to change the hostname of a MacOS computer.
$ hostname
mycomputer.domain.com
$ sudo scutil –set HostName mynewcomputername.domain.com
$ hostname
mynewcomputername.domain.com
Likewise, you can change the ComputerName variable too:
$ sudo scutil –set ComputerName mynewcomputername.domain.com
No comments yet.