Created
December 4, 2023 03:53
-
-
Save mttjohnson/1152550255d91423a0c7288ec9ce3469 to your computer and use it in GitHub Desktop.
change macos hostname
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new_hostname="my-new-hostname" | |
sudo scutil --set HostName ${new_hostname} | |
sudo scutil --set LocalHostName ${new_hostname} | |
sudo scutil --set ComputerName ${new_hostname} | |
dscacheutil -flushcache | |
# reboot mac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment