Change Your Mac's Computer Name with scutil
Rename your Mac the reliable way using scutil --set so AirDrop, sharing, and Find My show the name you want.
Run sudo scutil --set ComputerName "New Name" (and the same with LocalName) to rename your Mac from the terminal.
01Command
Command
$ sudo scutil --set ComputerName "Minis MacBook" && sudo scutil --set LocalName "Minis MacBook"02What it does
macOS keeps the friendly computer name in a configuration store that scutil reads and writes; System Settings edits the same value, but it can silently revert after reboots or iCloud sync. ComputerName is the name you see everywhere, LocalName is the Bonjour name other devices resolve (usually the same name with dashes). Set both so AirDrop, file sharing, and Find My consistently show your chosen name.
03Risk
!Warning: The change takes effect immediately but some apps cache the old name until relaunch. If other devices still show the old name, toggle Wi-Fi off and on to refresh the Bonjour record.
04Undo
Undo
$ sudo scutil --set ComputerName "MacBook Pro" && sudo scutil --set LocalName "MacBook Pro"05Sources
- scutil - Manage system configuration parametersEvidence: Documents scutil --set ComputerName, LocalName and HostName for changing the names macOS advertises on the network.
- Change your computer's name or local hostname on MacEvidence: Apple's official page on the computer name and local hostname shown to other devices on the network.
Last verified: 2026-09-18 · Category: System & Settings