
Standard command like hostname will still work in macOS, but perhaps it's best to use the native way of updating system information on your Mac? scutil command is here to help.
Change Hostname with scutil
Simply run this command in your Terminal window:
[email protected]:/ $ sudo scutil --set HostName "maverick"
if you now start new Terminal window or even just start new shell, you should see the new hostname:
[email protected]:/ $ sudo scutil –set HostName "maverick"
[email protected]:/ $ bash
[email protected]:/ $ hostname
maverick
That's it for today!
Leave a Reply