Update computer name/hostname commands

This commit is contained in:
Eitot 2016-11-12 07:22:36 +01:00
parent 71d4d627ca
commit eacbb67647

View File

@ -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