Hostname - macOS

Set HostName, LocalHostName, and Computer Name on macOS via Terminal

Replace --set with --get in any command to show current system setting.

Set HostName

Fully Qualified HostName

sudo scutil --set HostName <new host name>

Set LocalHostName

Bonjour HostName, usable on Local Network

sudo scutil --set LocalHostName <new host name>

Change Computer Name

This is the user-friendly computer name you see in Finder.

sudo scutil --set ComputerName <new name>

Last updated