If you want to change the Computer Name of your Mac (Macbook/iMac/Mac Studio) then you can make use of scutil command using the --set option.
Syntax:
% scutil --set ComputerName "<name>"
Example:
% scutil --set ComputerName "Sam's Macbook Pro"

Note: There are 3 names on Mac that you should be aware of,
- Computer Name: The user-friendly name displayed on the Sharing preference pane and used for identifying your Mac on a local network.
- Localhost Name: The name that is displayed at the bottom of the Sharing Settings window
- Host Name: The name used to identify the computer on a network.
You can change all of them using scutil,
sudo scutil --set ComputerName "<your-new-name>"
sudo scutil --set LocalHostName "<your-new-name>"
sudo scutil --set HostName "<your-new-name>"
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!