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.

macOSsystemnamingscutilMedium risk
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

RiskMedium risk
!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

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions