How to Rename Your MacBook

A zsh showing the login time, user name and host name

This is another blog entry in the #ReminderToSelf category.

I got a new MacBook an wanted to change its hast name since I find “Stephan’s Mac” not terribly inspiring.

Since joining the Oceanography department at the University of Bremen (years, nearly two decades ago), I find ocean names are the way to go. — Even more so since I started open water swimming not that long ago.

Here’s what I tried first:

  1. Set the name in the Mac’s system setting under “General” ➙ About:
    The Mac's system setting showing the name of the computer
  2. Set it in the “Sharing” part as well:
    
The Mac's 'Sharing' option to sewt the computer's network name

Interestingly, that didn’t seem to be enough, the command line prompt still showed the computer’s default name.

However, there’s a command line tool that allows setting these kinds of information `scutil’:

> scutil --get HostName
atlantic
> scutil --get ComputerName
atlantic
> scutil --get HostName
atlantic

This command can also set these names by using --set instead of --get.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Seaside Testing

Subscribe now to keep reading and get access to the full archive.

Continue reading