Three commands are required to change your hostname.
So start by launching the Terminal application located in the Utilities folder of your Applications.
To set the display name of your Mac (in my case MacBook Pro) in the command prompt, type the following command:
macbook-pro:~ mactimes$ sudo scutil --set ComputerName "MacBook Pro"To set the host name of your Mac (in my case macbook-pro) in the command prompt, type the following command:
macbook-pro:~ mactimes$ sudo scutil --set HostName "macbook-pro"Thereafter, if you wish to view the names configured, use the following commands:
macbook-pro:~ mactimes$ sudo scutil --set LocalHostName "macbook-pro"
To view the diplay name of our Mac (in my case MacBook Pro) in the command prompt, type the following command:
macbook-pro:~ mactimes$ sudo scutil --get ComputerNameTo view the diplay name of our Mac (in my case MacBook Pro) in the command prompt, type the following command:
MacBook Pro
macbook-pro:~ mactimes$ sudo scutil --get HostName
macbook-pro
macbook-pro:~ mactimes$ sudo scutil --get LocalHostName
macbook-pro
0 comments:
Post a Comment