Set the hostname on macOS

Use scutil to set a Mac’s FQDN.

sudo scutil --set HostName fqdn.example.com

Other commands

scutil --get HostName        # fqdn, same as hostname -f
scutil --get LocalHostName   # same as hostname -s
scutil --get ComputerName    # your computer's "friendly" name

More info

Update theme
b08fa5f