Set Mac Hostname
July 30, 2023 —
Gregg Szumowski
To set the host name of your Mac (in my case macbook-pro) in the command prompt, type the following command:
$ sudo scutil --set HostName "macbook-pro"
$ sudo scutil --set LocalHostName "macbook-pro"