How To Change A Mac’s Computer Name And Host Name With Terminal

Share This:

finder-icon

If you’re a Mac user, you probably know that you can go to System Preferences from the Apple menu in OS X, then go to Sharing and change your computer name from there.

What happens when that option is greyed out and you can’t change it? In my case, I could click on Edit and give my computer a new name, but everything kept referencing the old computer name.

Luckily, there’s a way to do it through the terminal. Open up a new terminal window and type both of these commands. You’ll be prompted for your admin password to make the changes. You’ll want to replace computername.local with whatever you want to call your computer.

scutil --set ComputerName computername.local
scutil --set HostName computername.local

That’s all there is to it!


Share This:

 

Leave a Reply