Renaming macOS Hostname

Every organisation has their own naming convention, to identify devices with their associated asset tags. Some macOS users may simply change this hostname or sharing name if they have administrator access.

This could potentially break Active Directory binding, or conflict with other systems or functions.

In macOS you can re-name the hostname and sharing name with the following 3 commands.

Open and type the following, where the <device-name> at the end suits your companies naming convention.

sudo scutil –set ComputerName <device-name>

sudo scutil –set HostName <device-name>

sudo scutil –set LocalHostName <device-name>

The command is case sensitive.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s