> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Find which interface a particular IP address is configured on
- URL: https://kudithipudi.org/how-to-find-which-interface-a-particular-ip-address-is-configured-on/
- Published: 2009-05-22T19:28:53.000Z
- Updated: 2009-05-22T19:28:53.000Z
- Description: There are a ton of scripts to find how many IP addresses Â are configured on a system, but I could not find one, whic would show...
- Author: admin
- Tags: HOWTO, Linux, Programming, Technology, Uncategorized, #wp, #wp-post, #Import 2026-08-23 02:32

There are a ton of scripts to find how many IP addresses Â are configured on a system, but I could not find one, whic would show me which particular network interface an IP address was configured on. Here is a one liner, that will give you this information in [Linux](http://en.wikipedia.org/wiki/Linux?ref=kudithipudi.org)

`/sbin/ifconfig | grep -B1 10.10.10.10 | awk '{if (NR==1) print $1}'`

The same script can be changes a bit to support other operating systems too. Essentially, I am doing a grep (search) of the output of ifconfig, which shows all the network information on the system for a particular IP. At the same time, I am using the -B1 option, which will show the line above the matching line. Finally, I am piping this to awk and printing the first row in the first column.