Mac: Find IP by Hostname

Body

Overview

Use this guide to find the IP address associated with a hostname by using the Terminal on a Mac computer. 

Procedure


Step 1: Open Launchpad

Locate the Launchpad icon (usually in the taskbar at the bottom of the screen; it looks like a grid of colorful squares) and click it.

Launchpad homescreen

 

Step 2: Open Terminal

In the Launchpad search bar (top center of the screen), type Terminal. Click the black Terminal icon that appears to open it.

Step 3: Run nslookup

In the Terminal window, type: nslookup [hostname]

Replace [hostname] with the website or server you want to check (for example, nslookup example.com). Press Enter.

nslookup on Terminal

Step 4: View Results

Terminal will display one or more IP addresses associated with that hostname. Once you see them, you’re done!

IP address on Terminal

 

Contact Information:

IT Help Desk Contact & Zoom Desk
In Person: Hardman & Jacobs Undergraduate Learning Center - Room 105
Phone: (575) 646-HELP (4357)

Email: help@nmsu.edu



Zoom Link:
https://nmsu.zoom.us/my/nmsuithelpdesk
Or meeting ID: nmsuithelpdesk
Zoom with us M-F 8am-5pm

Details

Details

Article ID: 5808
Created
Wed 6/21/23 5:48 PM
Modified
Fri 11/7/25 3:57 PM
Environment
What service, system, process, application, or product could be impacted? Has anything changed in the environment recently? Environment statements are specific to the issue and resolution, and are true before and after resolution.
Mac