Find your Mac's hostname and IP address

Last updated: November 25, 2026 · By Jérémie Aouate

Your Mac's local hostname is at the bottom of System Settings › General › Sharing, and ends in .local, for example Johns-Mac-mini.local. Its IP address is in System Settings › Wi‑Fi › Details, under TCP/IP. In Terminal, scutil --get LocalHostName and ipconfig getifaddr en0 print them. From an iPad or iPhone at home, type either one; away from home, use the Mac's Tailscale address.

Three names, one Mac

NameExampleWhere to see itWhat it is for
Computer nameJohn's Mac miniSystem Settings › General › About › NameThe name people see for the Mac on the network
Local hostnameJohns-Mac-mini.localSystem Settings › General › Sharing, at the bottomThe address other devices on your network use to reach the Mac
HostnameJohns-Mac-mini.localTerminal: hostnameThe name Terminal and network tools report
Labels and Terminal output checked on macOS 27.2, November 25, 2026. Names are examples.

Apple's rule: the local hostname is the computer name with spaces replaced by hyphens and .local added. If another Mac on your network already has the name, macOS adds a number; if the name doesn't suit Bonjour, the Mac falls back to Macintosh.local.

In System Settings

The Local hostname row at the bottom of the Sharing pane, reading Johns-Mac-mini.local, with the text Computers on your local network can access your computer at this address and an Edit button.
The Local hostname row in System Settings › General › Sharing, on a test Mac named John's Mac mini.
The TCP/IP tab of a network service's details in System Settings: Configure IPv4 Using DHCP, then the IP address, Subnet mask 255.255.255.0 and Router lines, with the addresses hidden.
Details › TCP/IP on macOS 27, here for an Ethernet connection; the IP address line is the second one. Addresses are hidden.

With Screen Sharing turned on, its options also show the IP address after vnc://, for example vnc://192.168.1.20/.

In Terminal

Open Terminal (Applications › Utilities) and type these commands. They only read; they change nothing.

Terminal after four commands: scutil --get LocalHostName prints Johns-Mac-mini, scutil --get ComputerName prints John's Mac mini, hostname prints Johns-Mac-mini.local, and ipconfig getifaddr en0 prints an IP address, hidden here.
The four commands in Terminal on a test Mac. The IP address is hidden.

Which one to type on your iPad or iPhone

On the same Wi‑Fi, DualMac usually finds the Mac by itself. If it doesn't, tap + in the library (or Add by address when it is empty) and type one of these:

To skip typing on the device, make a link or QR code with Add a Mac to DualMac. If the address is right and the Mac still doesn't answer, go to DualMac can't find my Mac. The whole setup is in Control your Mac from an iPad.

Change the Mac's name

  1. System Settings › General › About: replace the Name.
  2. System Settings › General › Sharing: check the Local hostname. To change it, click Edit, type the new name and click OK.
  3. On the iPad or iPhone, update any Mac you added by its old .local name.

MAC address is not IP address

The MAC address is the hardware address of the Mac's network adapter, used for Wake-on-LAN, while the IP address is the one your network gives the Mac and the one you type to connect.

Questions

How do I find my local IP address on my Mac?

System Settings › Wi‑Fi › Details… › TCP/IP, or type ipconfig getifaddr en0 in Terminal. At home it is usually a private address such as 192.168.1.20.

What is the local hostname of a Mac?

The name devices on your network use to reach it, ending in .local. It is at the bottom of System Settings › General › Sharing.

Computer name, local hostname, hostname: what's the difference?

The computer name is for people and may have spaces. The local hostname is its network form, with hyphens and .local. The hostname is what Terminal reports, usually the local hostname.

How do I change my Mac's name?

In System Settings › General › About, edit the name. The local hostname is edited in General › Sharing, with Edit.

Can I see the Mac's name on the login screen?

You can show it yourself: in System Settings › Lock Screen, turn on Show message when locked and type the Mac's name as the message that appears on the lock screen.

Is the MAC address the same as the IP address?

No. The MAC address belongs to the network hardware; the IP address is the one the network gives the Mac, and the one you connect to.

Which address do I use over Tailscale (100.x or MagicDNS)?

Either. The 100.x address and the name ending in .ts.net both reach the Mac on your tailnet.

Sources

  1. Apple Support, Change your computer’s name or local hostname on Mac, Mac User Guide. Checked on November 25, 2026.
  2. Apple Support, Enter TCP/IP settings on Mac, Mac User Guide. Checked on November 25, 2026.
  3. Apple, System Settings labels and the output of scutil, hostname, ipconfig and networksetup, read on macOS 27.2.1. Checked on November 25, 2026.