Mac Setup

Written & tested for accuracy by a developer (not AI)

Change Mac Name

How to change your Mac name: the Computer Name that appears in AirDrop and Bluetooth, the Local Hostname in your terminal prompt, and your username and home folder. Steps in System Settings and from the terminal, for MacBook Air, MacBook Pro, iMac, Mac mini, Mac Studio, and Mac Pro.

Your Mac has several names, and each one appears in a different place. The Computer Name is what other people see, and the username is the name of your account and home folder.

Changing your Mac name is one step in setting up your Mac. See the full roadmap to set up a Mac for software development. This article is part of a series on Mac Setup.

Tested on macOS 27 Golden Gate, September 2026.

Before you get started

Before you rename your Mac, get useful apps from Setapp (Get Backup Pro is good for saving backups). I've used Setapp for years, paying a low monthly subscription to get apps I need. They offer a Setapp free 7-day trial that I recommend. Check it out.

Change the Computer Name: quick answer

Open Apple menu > System Settings > General > About. Click the name at the top of the pane and type a new one. The new name appears in AirDrop, Bluetooth, and Find My right away.

General > About settings showing the Mac name in macOS 27 Golden Gate

Choose which name to change

Which name you change depends on where you see it:

  • The name in AirDrop, Bluetooth, Find My, or on a network: change the Computer Name.
  • The name in your terminal prompt, or a .local network address: change the Local Hostname.
  • The name on the login screen: change the full user name.
  • Your account name or home folder, such as /Users/daniel: change the username. This is the hardest change, so read the warnings first.
  • The name on your Apple Account: change it in Apple Account settings.

Here are all the names at a glance, with where to find each one:

  • Computer Name: System Settings > General > About
  • Local Hostname: System Settings > General > Sharing, or scutil --get LocalHostName in a terminal application
  • HostName: scutil --get HostName in a terminal application (see Change Mac Hostname)
  • Full user name: System Settings > Users & Groups
  • Username (short name): whoami in a terminal application
  • Home folder: /Users/<username>, which you can open with open ~ in a terminal application
  • Apple Account name: System Settings > Apple Account > Personal Information

There is one other name, the NetBIOS name, which is seldom used anymore. It is a holdover from the days when Macs and Windows PCs shared files with an older protocol. To see it, open System Settings > Network, choose your connection, such as Ethernet, click Details, and then click WINS.

Why change your Mac name

A Mac's default Computer Name combines your first name with the Mac model, for example "Daniel's MacBook Air." That name is fine in a small office or classroom where it is visible on AirDrop or a network. However, two computers with the same name are confusing. In a coffee shop or coworking space, you might prefer something impersonal.

Change the Computer Name in System Settings

The Computer Name is the "friendly" name that identifies your Mac to other devices. It appears in AirDrop, Bluetooth, the Find My app, and on your local network. There is no separate setting for the AirDrop or Bluetooth name.

Open Apple menu > System Settings > General > About. You will see the name of your Mac at the top of the pane. It is not obvious, but the name is an editable field: click it and type a new name. The change takes effect when you press Return or click elsewhere.

When you change the name here, macOS changes the Local Hostname to match, so your .local address and your terminal prompt use the new name too.

Change the Computer Name from the terminal

You can also open a terminal application and change the Computer Name with the scutil command, which sets system configuration values. Replace "the-name" with the name you want:

$ scutil --set ComputerName "the-name"

A dialog asks for your password. The name changes after you enter it. Changing the Computer Name with scutil does not change the Local Hostname, so set that separately if you want them to match.

Change the Local Hostname

The Local Hostname is the Bonjour name your Mac uses for .local network addresses, such as the-name.local. Your terminal prompt shows it by default, which is why many people change it. It can contain only letters, numbers, and hyphens.

To change it in System Settings, open General > Sharing. Scroll to the bottom of the pane, find Local hostname, and click Edit.

General > Sharing settings showing the Local hostname in macOS 27 Golden Gate

Or change it from a terminal application. Replace "the-name" with the name you want:

$ scutil --set LocalHostName "the-name"

A dialog asks for your password. You will see the new name in the terminal prompt after you open a new terminal window.

For the HostName, the third name scutil sets, see Change Mac Hostname.

Change your full user name

The full user name is the display name on the login screen. Changing it is simple, and it does not affect your username, your home folder, or any file paths.

Open System Settings > Users & Groups. Click the info button (the circled "i") next to your account, then change the User name field. Despite its label, this field holds the full name, not the short username.

Change your username and home folder

Your username (also called the short name or account name) appears in your terminal prompt, in the output of whoami, and in your home folder path, /Users/yourname. The home folder is the directory with the same name. The two must match, so you change them together.

Important: changing your username is the most complex name change, and a mistake can lock you out of your files. Back up your Mac with Time Machine first. If you are setting up a new Mac, it is easier to create a fresh account with the username you want than to rename an existing one.

Renaming the home folder can break things that refer to the old path:

  • absolute paths in shell configuration files, such as ~/.zprofile and ~/.zshrc
  • application settings that refer to /Users/oldname
  • Homebrew caches and symbolic links
  • Git configuration

You cannot rename the account you are logged in to, so the steps use a second administrator account:

  1. Open System Settings > Users & Groups, click Add User, and enter your password when asked. Set New User to Administrator, because new accounts are Standard by default. Create the account with a temporary name and password.
  2. Log out of your current account with Apple menu > Log Out.
  3. Log in to the temporary administrator account.
  4. Open the Finder, choose Go > Go to Folder, and enter /Users. Rename your original home folder from the old name to the new name. You will need to enter the administrator password.
  5. Open System Settings > Users & Groups. Control-click (or right-click) your original account, choose Advanced Options, and enter the administrator password when asked.
  6. Change the User name field to the new username. Change the Home directory field to /Users/newname so it matches the renamed folder. Click OK.
  7. Restart your Mac and log in to your original account, which now has the new username.

Check the change in a terminal application. The first command shows your username and the second shows your home folder:

$ whoami
$ echo $HOME

Both should show the new name. After you confirm everything works, delete the temporary administrator account in System Settings > Users & Groups.

Change your Apple Account name

Your Apple Account name is separate from your Mac username. It is the name on your account with Apple, and your Mac used it to suggest your username when you first set up the Mac. Changing it later does not change your username.

Change it in System Settings > Apple Account > Personal Information. You must be signed in to your Apple Account.

Continue setting up your Mac

Don't miss the full visual roadmap and checklist that shows how to set up a Mac for software development, with all the essential tools and settings you might not yet know about.