
Launch the Terminal and type the following:Įn1 is the code for the Airport interface, en0 is usually ethernet. If you’re not comfortable with the command line then it’s probably better to just use the GUI method above. This is my preferred method to check for the LAN IP because I find it faster. How to Check your LAN IP address via the Mac OS X Command Line

In this case, you can see result like following: default 192.168.195.1 UGSc 14 0 en2 This command filters and displays those lines of result having default.

To display only the selected lines of result, we can use grep command along with netstat netstat -rn | grep 'default' The ip address of gateway is in the first line one with default at its first column. The sample result is as following: Routing tablesĭestination Gateway Flags Refs Use Netif Expireġ92.168.195.1 0:27:22:67:35:ee UHLWIi 22 3 This gives a long list of ip addresses and it is not easy to find the required field. For getting the list of ip addresses associated, you can use netstat command netstat -rn
