Get your LAN IP Address in Mac OS X

Aug 8, 2010 - 6 Comments

Anytime you are connected to a local area network (LAN) you’ll be assigned an IP address for that network, and often it’s important to know what this IP address is. There’s two quick ways to get your LAN IP address in Mac OS X, one is more user friendly using the GUI and the other is through the command line.

Find your LAN IP address via the Mac OS X GUI

  • Open “System Preferences”
  • Click on “Network”
  • Your Airport or Ethernet LAN IP address will be visible immediately next to “Status” with the next: “Airport is connected to RouterName and has the IP address of x.x.x.x” The x.x.x.x numbers are your LAN IP

lan ip address mac

Check your LAN IP address via the Mac OS X command line

This is my preferred method to check for the LAN IP because I find it faster. If you’re not comfortable with the command line then it’s probably better to just use the GUI method above.

Launch the Terminal and type the following:
ipconfig getifaddr en1 en1 is the code for the Airport interface, en0 is usually ethernet. Once this command is executed, an IP address will be reported back to you, and this is your IP on the LAN.

Troubleshooting and setting IP addresses in Mac OS X
Knowing your machines IP address can be a big help when you are troubleshooting network problems or setting up a LAN. If you’re encountering trouble with your Macs wireless check out these troubleshooting tips for Mac wireless problems. Sometimes you’ll want to set a manual IP address on your Mac and that isn’t difficult either.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Manish Patel in Mac OS X, Tips & Tricks

6 Comments

» Comments RSS Feed

  1. Tommy says:

    Should that not be “ifconfig”, and not “ipconfig”?

    • Roberto says:

      You can get the information from both ‘ifconfig’ and ‘ipconfig’ but the author seems to want to strip the extraneous information provided by ifconfig and get right to the address with ‘ipconfig’.

  2. clattr says:

    A more general solution for the Terminal,
    output is just the IP address of the default route:

    route -n get default|grep interface|awk ‘{ print $2 }’|xargs ipconfig getifaddr

    - determine the interface of the default route
    - extract the line w/ the identifier of the interface
    - let AWK determine the name and pass it
    - to ipconfig via xargs

  3. Vijay Kumar says:

    There are probably a million ways to get this info, but what the author provided is terse and easy to understand. Thank you Manish.

  4. s says:

    Would love information on ho to set up a LAN!

  5. Josh says:

    Hello guys..

    my mac..works noramlly on wifi at home..i bought a adsl voucher.my pc can access the internet but my mac cant..what is the problem?

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates