Quick answer

Open System Settings › General › About and type a new name in the Name field. You can also change it in System Settings › General › Sharing. On macOS Monterey and earlier, use System Preferences › Sharing › Computer Name.

Prior to macOS Ventura and macOS Sonoma if you wanted to rename your Mac's name you had to open System Preferences and go to Sharing and change the computer name by editing the name from Computer Name's value.

Computer Name field in macOS Monterey Sharing preferences

In macOS Ventura and the upcoming macOS Sonoma you still can edit the name by going to System Settings -> General -> Sharing and change the name, but there is another way to edit the computer's name.

Rename your Mac from the About section

Open System Settings and in the General under the About section you can see the details of your computers and in front of the Name you can edit your Mac's name by typing any name you like:

Editing the Mac name in System Settings, General, About in macOS Ventura
New Mac name entered in the About section of macOS Ventura System Settings

You can still edit the name from System Settings -> General -> Sharing section if you want.

Local hostname in System Settings, General, Sharing in macOS Ventura

Related guide: Sonoma Screen Savers and Desktop Wallpapers.

Frequently Asked Questions

Got questions? We've got answers.

Where is the computer name on macOS Ventura, Sonoma and Sequoia?
In System Settings › General › About, next to Name. It is also shown, and can be edited, in System Settings › General › Sharing.
Where was the setting before macOS Ventura?
In System Preferences › Sharing, in the Computer Name field at the top of the window.
What does the Mac’s name change?
It is the name other devices see for AirDrop, file sharing, Screen Sharing and in Finder on your network, and the name shown in Find My.
Do I need to restart after renaming my Mac?
No. The new name is used straight away; other devices on the network may take a moment to show it.
Can I use spaces and special characters?
Yes, you can type any name you like. macOS derives the local network name (ending in .local) from it automatically and replaces characters that cannot be used there.
Does renaming my Mac change my user account name?
No. The computer name and your user account are separate, so renaming the Mac does not change your account name, home folder or Apple ID.
Why does another device still show the old name?
Devices on the network remember names for a short time. Turning Wi-Fi off and on, or restarting the other device, makes it pick up the new name.