X

How to quickly look up your IP address in OS X

If you need to look up your Mac's IP address, there are some quick ways to do so.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
2 min read

There are generally two relevant IP addresses that your computer will use. The first is the LAN address, configured directly on your system, which is the private IP address that computers and devices use to communicate when behind a router (such as that at your home). The second is the public IP address issued by your Internet service provider, and can usually be used either directly on your system or with a router.

In most cases, private IP addresses are set up by a router to establish a protected network for computers and other devices, and are not directly accessible from the Internet but are used extensively for device-to-device communication in your home or office.

To look up a private IP address, you can go to the Network preferences pane in your Mac and select your active network connection. When you do so, the main window will show the IP address currently assigned to that connection.

You can also look up your private IP address in the Terminal, using the following commands for both Wi-Fi and Ethernet connections:

networksetup -getinfo Wi-Fi
networksetup -getinfo Ethernet

A publicly accessible IP will be the one issued by your ISP, and it allows you to contact your home network from remote locations.

Public IP address lookup in OS X
Searching for the term "IP" in Google will reveal your current public IP address. Screenshot by Topher Kessler/CNET

This IP address is generally configured in a router (not in your computer), and therefore connections to your computer using it will require proper routing and forwarding configurations in your router.

If you need to look up your router's public IP address, you can do so in several ways beyond going to your router's configuration.

The easiest way to look it up is to perform a Google search for the term "IP" (click here). The search results will show your public IP address as the first entry.

Some third-party utilities that you can install will look this up and keep you informed if it changes. Furthermore, OS X Daily recently outlined some options for looking this up via the command line, which may be useful if you need to determine the IP address in a script.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.