What the Mac name is and why you might change it

Your Mac has a computer name — the name that appears when other people try to connect to your Mac over a network, or when your Mac shows up in file sharing. It also appears in System Settings and in the terminal window. By default, Apple sets this to something like "Marcus's MacBook Pro" or "MacBook-Air-12345", but you can change it to anything you want.

You might change your Mac's name to make it easier to find on a shared network, to match a naming system you use for all your devices, or straightforward because you want something shorter or more professional. The change takes effect when ready and does not affect any of your files or settings.

There is also a separate local hostname that your Mac uses for technical networking purposes, but for most people, changing the computer name in System Settings is all you need to do.

Key Takeaways

  • Your Mac's computer name is visible to other people and devices on your network, and you can change it anytime without affecting your files.
  • The fastest way to change it is through System Settings under General, then About, then Edit.
  • The name can include letters, numbers, spaces, and hyphens, but some special characters may cause problems on networks.
  • If you share your Mac with other users, any of them can change the computer name, and the change applies to everyone.

How to change your Mac name in System Settings

Open System Settings by clicking the Apple menu in the top left corner of your screen, then select System Settings. On the left side, click General. Near the top of the window, you will see a section labeled "About" — click that.

In the About window, look for the field that shows your current computer name at the top. Next to it, you will see an Edit button. Click Edit, type your new name, then click Done. Your Mac will update the name when ready.

If you do not see an Edit button, your user account may not have permission to change the computer name. Ask the administrator of your Mac to make the change, or check System Settings > General > Sharing to see who has admin access.

What characters and length work best

Your Mac's name can be up to 63 characters long, but shorter names are easier to type and remember. You can use letters (uppercase and lowercase), numbers, spaces, and hyphens without any problems.

Avoid special characters like @ # $ % ^ & * ( ) = + [ ] { } ; : ' " , . < > / ? \ | ` ~ because they can cause confusion on networks or in terminal commands. If you use spaces, other devices will sometimes replace them with hyphens automatically, so "My MacBook" might appear as "My-MacBook" on some networks.

Good examples are "Marcus-MacBook", "Office-iMac", "Design-Mac", or "Kitchen-Mac". Avoid names that are only numbers or that start with a hyphen.

Changing your Mac name from the terminal

If you prefer to use the terminal, you can change your computer name there as well. Open Terminal (search for it in Spotlight by pressing Command-Space, typing "Terminal", then pressing Enter).

In the terminal window, type this command exactly: sudo scutil --set ComputerName "Your New Name" — replace "Your New Name" with whatever you want. Press Enter, then type your password when prompted. The terminal will not show your password as you type, but it is being entered.

You can also set the local hostname at the same time by typing: sudo scutil --set LocalHostName "your-new-name" (use hyphens instead of spaces for the hostname). Most people do not need to change the local hostname, but it can help if you use SSH or other technical networking tools.

What happens after you change the name

The change takes effect right away. Your Mac will when ready show the new name in System Settings, and other people on your network will see it the next time they look for shared computers or printers. You do not need to restart your Mac.

If you are using iCloud or have set up Find My Mac, your device will update its name in those services within a few minutes. If you have shared folders or file sharing turned on, the new name will appear to other users the next time they browse the network.

Your email, documents, photos, and all other files remain exactly as they are. Changing the computer name does not touch any of your data.

If multiple people use your Mac

Any user account with administrator access can change the computer name. The change applies to the entire Mac, not just one user account — everyone who uses that Mac will see the new name.

If you share your Mac with family members or colleagues and want to prevent them from changing the name, you can restrict access through System Settings > General > Sharing, but this requires some technical setup. For most households, it is simpler to just agree on a name together.

Troubleshooting if the name will not change

If you click Edit but the button does not respond, or if you get an error message, the most common reason is that your user account does not have administrator access. Ask whoever set up the Mac to make the change for you, or check System Settings > General > Users & Groups to see your account type.

If you are using the terminal and get a "permission denied" error, make sure you included sudo at the start of the command and that you typed your password correctly. If you have not set a password on your Mac, you may not be able to use the terminal method — use System Settings instead.

If the name changes in System Settings but does not appear on your network, restart your Mac and wait a few minutes. Sometimes network devices take time to see the updated name. If it still does not appear, check that file sharing or AirDrop is turned on in System Settings > General > Sharing.

Frequently Asked Questions

Can I change my Mac's name to anything I want?

Almost anything — you can use letters, numbers, spaces, and hyphens. Avoid special characters like @ or $ because they can cause problems on networks. Keep it under 63 characters, though shorter names are easier to work with.

Will changing my Mac's name affect my Apple ID or iCloud?

No. Your Apple ID and iCloud account are separate from your computer name. Changing the name does not log you out or affect your data. Your Mac will update the device name in iCloud within a few minutes.

What is the difference between computer name and local hostname?

Computer name is what appears in System Settings and on your network — it is what most people see. Local hostname is a technical name used for SSH and advanced networking. For everyday use, you only need to change the computer name.

Do I need to restart my Mac after changing the name?

No. The change takes effect when ready. Other devices on your network may take a few minutes to see the new name, but your Mac itself updates right away.

Can I change my Mac's name if I am not the administrator?

No. Only an account with administrator access can change the computer name. Ask the person who set up your Mac to make the change, or check System Settings > General > Users & Groups to see if you can request administrator access.