From eacbb67647f0541a7f3ba6cd1023ad0aaaf6a573 Mon Sep 17 00:00:00 2001 From: Eitot Date: Sat, 12 Nov 2016 07:22:36 +0100 Subject: [PATCH] Update computer name/hostname commands --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a8d7973..d11fdcf 100644 --- a/README.md +++ b/README.md @@ -947,12 +947,22 @@ sudo killall -HUP mDNSResponder ### Hostname -#### Set Computer Name/Host Name +#### Set Computer Name ```bash -sudo scutil --set ComputerName "newhostname" && \ -sudo scutil --set HostName "newhostname" && \ -sudo scutil --set LocalHostName "newhostname" && \ -sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "newhostname" +# Status +scutil --get ComputerName + +# Set +sudo scutil --set ComputerName "newcomputername" +``` + +#### Set Hostname +```bash +# Status +scutil --get LocalHostName + +# Set +sudo scutil --set LocalHostName "newhostname" ``` ### Network Preferences