refs:
http://osxdaily.com/2010/09/06/change-your-mac-hostname-via-terminal/
http://osxdaily.com/2007/02/15/changing-your-macs-computer-name/
Change your Mac Hostname via Terminal
通过命令行:
sudo scutil –-set HostName new_hostname
查看:
hostname
或
sudo scutil –-get HostName
Set LocalHostName in OS X with scutil
LocalHostName is the name identifier used by Bonjour and visible through file sharing services like AirDrop
scutil --set LocalHostName "MacBookPro"
Changing your Mac’s computer name
- Launch ‘System Preferences’
- Click the ‘Sharing’ icon
- Type in what you want your Mac’s new computer name to be
- Close ‘System Preferences’ – it’s that easy