Update computer name/hostname commands
This commit is contained in:
parent
71d4d627ca
commit
eacbb67647
20
README.md
20
README.md
@ -947,12 +947,22 @@ sudo killall -HUP mDNSResponder
|
|||||||
|
|
||||||
### Hostname
|
### Hostname
|
||||||
|
|
||||||
#### Set Computer Name/Host Name
|
#### Set Computer Name
|
||||||
```bash
|
```bash
|
||||||
sudo scutil --set ComputerName "newhostname" && \
|
# Status
|
||||||
sudo scutil --set HostName "newhostname" && \
|
scutil --get ComputerName
|
||||||
sudo scutil --set LocalHostName "newhostname" && \
|
|
||||||
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "newhostname"
|
# Set
|
||||||
|
sudo scutil --set ComputerName "newcomputername"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Set Hostname
|
||||||
|
```bash
|
||||||
|
# Status
|
||||||
|
scutil --get LocalHostName
|
||||||
|
|
||||||
|
# Set
|
||||||
|
sudo scutil --set LocalHostName "newhostname"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Network Preferences
|
### Network Preferences
|
||||||
|
Loading…
Reference in New Issue
Block a user