When you launch Terminal, you can see your Computer’s name appears in command prompt. You may also run hostname in Terminal to check your hostname. You may want to change the hostname of your computer while you are sharing files between computers or for any other reasons. Changing hostname or Computer’s name on Mac is a very easy job.
Just launch the Terminal and fire below command:
sudo scutil –set HostName NEW_HOST_NAME
It will prompt for current user password. Provide the password and hit “Enter”
Debaleenas-MacBook-Pro:Desktop TechEntice$ hostname
Debaleenas-MacBook-Pro.local
Debaleenas-MacBook-Pro:Desktop TechEntice$ sudo scutil --set HostName TechEntice
Password:
Debaleenas-MacBook-Pro:Desktop TechEntice$ hostname
TechEntice
That’s it. Now close the Terminal and launch it again, the new hostname will appear in command prompt.
Leave a Reply