Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Command to see ip address on etch stable

From: Vincent Lefevre <vincent(at)vinc17.org>
Date: Sun Aug 26 2007 - 11:06:07 EDT


On 2007-08-23 17:31:03 -0400, Orestes leal wrote:
> ifconfig eth0 | grep inet | awk '{ print $2 }'
>
> Where eth0 it's your first network card, and so on.

Note that the Linux kernel doesn't specify what is your first network card (e.g. upgrading the kernel can change the names of your network cards). It's better to use the MAC address to select the IP address. Moreover your command gives garbage when the machine has IPv6 support (grep ' inet ' is better).

-- 
Vincent Lefèvre <
vincent(at)vinc17.org> - Web: <
http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <
http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Sun Aug 26 11:26:10 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 02:58:06 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library