How to Rename Your Mac (Computer Name vs Hostname)

Your Mac has a name, and it shows up in more places than you’d think: AirDrop, screen sharing, Find My, your router’s device list, and the name printed on shared files. If yours still says MacBook Air or, worse, the previous owner’s name, here’s how to change it — and what the different “name” fields actually control.

The quick way: rename your Mac in System Settings

  1. Open the Apple menu → System Settings.
  2. Click General in the sidebar, then About.
  3. At the top you’ll see Name. Click it, type the new name, and press Return.

That’s it. The change is instant — no restart needed. On macOS Monterey and earlier the same setting lives under System Preferences → Sharing, in the Computer Name field at the top.

Computer Name vs. hostname: what each one does

When you rename your Mac, macOS is actually managing three related names. You only ever type the first one; it derives the other two for you.

  • Computer Name — the friendly, human-readable name (spaces and capitals allowed, e.g. Brandon’s MacBook Pro). This is what appears in AirDrop, in the Finder sidebar when someone browses to your Mac, and in the Sharing settings.
  • Local hostname — the Bonjour/mDNS name other devices use on your local network, always ending in .local (e.g. Brandons-MacBook-Pro.local). macOS builds this from the Computer Name by replacing spaces with hyphens and dropping special characters. You can edit it separately in System Settings → General → Sharing → the pencil/Edit button next to “Local hostname.”
  • Hostname (network) — the UNIX-level host name used in Terminal and by some network tools. Check it by opening Terminal and running hostname. On a normal home network it usually matches the local hostname; on a managed/corporate network a DHCP or directory server can override it.

Why the name matters

  • AirDrop & Handoff: the Computer Name is exactly what your friends and your own iPhone see when they try to send you a file. A clear name makes “which device is which” obvious.
  • Shared Wi-Fi (office, dorm, coffee shop): your Mac broadcasts its Computer Name to everyone on the same network. If it still shows the previous owner’s name — common on a used Mac — rename it before you connect anywhere public.
  • Screen sharing & remote login: you connect to a Mac by its .local hostname, so a tidy, predictable name makes remote access far easier.
  • Your router’s device list: a named Mac is easy to spot when you’re checking what’s connected or setting up port forwarding.

If the name won’t stick or keeps reverting

A few things can cause a Mac to snap back to a numbered name like MacBook-Air-2:

  • A name collision on the network: if another device already claims that .local name, macOS appends a number. Rename the other device or pick a unique name.
  • A managed profile: work or school Macs can have a configuration profile that forces the name. Check System Settings → General → Device Management — if a profile is listed, the name is controlled by IT.
  • Set it from Terminal (advanced): you can force all three names with sudo scutil --set ComputerName "New Name", sudo scutil --set HostName "New-Name", and sudo scutil --set LocalHostName "New-Name", then reboot.

Buying a used Mac? Rename it first

Renaming is one of the first things to do on any secondhand Mac — right alongside signing out of the old Apple ID and confirming Activation Lock is off. Every Mac we sell at LuxuriousComputers is fully wiped, signed out, and reset to a clean state, so it’s ready for you to name it whatever you like. If you’re setting one up from scratch, see our guide on how to set up a used MacBook, and if you ever pass it on, how to factory reset a MacBook walks through wiping it the right way.

Related reading

Ready for a Mac that arrives clean and ready to name? Browse our Apple clearance deals on fully-tested MacBooks.

Need help with a computer problem?

LC provides computer repair and practical IT support in Marion, Ohio. Tell us what is interrupting your work and ask about the service scope and availability.