Created
March 11, 2020 16:52
-
-
Save vijinho/8a2cf9641926a41cae5e7990f8d55d51 to your computer and use it in GitHub Desktop.
set MacOS hostname, computername: setmacoshostname.sh MyComputerName
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
sudo scutil --set HostName $1 | |
sudo scutil --set LocalHostName $1 | |
sudo scutil --set ComputerName $1 | |
dscacheutil -flushcache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment