Change Mac Hostname with scutil

Change Mac Hostname with scutil Change Mac Hostname with scutil

tandard 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:

greys@macbook:/ $ sudo scutil --set HostName "maverick"

if you now start new Terminal window or even just start new shell, you should see the new hostname:

greys@macbook:/ $ sudo scutil –set HostName "maverick"
greys@macbook:/ $ bash
greys@maverick:/ $ hostname
maverick

That’s it for today!

See Also

  • scutil
  • [Advanced Unix Commands][advanced-unix-commands]
  • [macOS Commands][macos-commands]



Contact Me

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
03 Sep 2024

macOS Sequoia 15.0

02 Sep 2024

Video: Has This Worked Before?

24 Mar 2024

Homelab: Mac Pro 2013 32GB

Recent Tweets