[Leaplist] What are my local IP addresses?
Kyle Gonzales
kyle.gonzales at gmail.com
Fri Jun 29 06:57:41 EDT 2007
If you want to see the IP addresses, with the subnet context included,
you can use ip addr:
ip addr show | grep "inet" | awk -F" " '{ print $2 }'
On 6/29/07, Phil Barnett <philb at philb.us> wrote:
> I was looking for a simple way to list all of the configured IP addresses on a
> linux box. Here's what I ended up with.
>
> Anyone know an easier way?
>
> ifconfig | grep "inet addr" | cut -d':' -f2 | cut -d' ' -f1
>
> If you don't want to see the localhost(s), you can:
>
> ifconfig | grep "inet addr" | cut -d':' -f2 | cut -d' ' -f1 | grep -v 127.0.0.
>
> If you're not root, you may have to use ifconfig with /sbin/ifconfig.
>
> --
> Phil Barnett
> AI4OF
> SKCC #600
> _______________________________________________
> Leaplist mailing list
> Leaplist at leap-cf.org
> http://lists.leap-cf.org/mailman/listinfo/leaplist
>
More information about the Leaplist
mailing list