Change your computer’s name or local hostname on Mac
Your computer’s name and local hostname are used to identify your computer on your local network.
Change your computer’s name
You can view and change your computer’s name in the About settings window.
On your Mac, choose Apple menu > System Settings, click General in the sidebar, then click About on the right. (You may need to scroll down.)
Type a new name in the Name field.
Change your computer’s local hostname
The local hostname, or local network name, is displayed at the bottom of the Sharing settings window. It identifies your Mac to Bonjour-compatible services.
The local hostname is your computer’s name with .local added, and any spaces are replaced with hyphens. For example, if your computer’s name is My Computer, your local hostname is My-Computer.local. Local hostnames aren’t case sensitive, so my-computer.local is the same as My-Computer.local.
On your Mac, choose Apple menu > System Settings, click General in the sidebar, then click Sharing on the right. (You may need to scroll down.)
Click Edit in the “Local hostname” section at the bottom of the window, then enter a new local hostname.
If needed, turn on the “Use dynamic global hostname” option. See Use a dynamic global hostname.
Click OK.
If your Mac has the exact name of another Mac on your local network, a number is added to the local network name.
If your computer name is not recognised by Bonjour, the local network name is Macintosh.local.