ComputerName is the so-called “user-friendly” name for the Mac, it’s what will show up on the Mac itself and what will be visible to others when connecting to it over a local network. This is also what’s visible under the Sharing preference panel.
scutil --set ComputerName "Foolbear's MacBookPro"
HostName is the name assigned to the computer as visible from the command line, and it’s also used by local and remote networks when connecting through SSH and Remote Login.
scutil --set HostName " foolmbp"
LocalHostName is the name identifier used by Bonjour and visible through file sharing services like AirDrop.
scutil --set LocalHostName "Fool MacBookPro"
Finally, you can also check the current settings of LocalHostName, HostName, and ComputerName by using scutil with the –get flag like so:
scutil --get HostName
没有评论 :
发表评论