Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Feb 2004 06:27:16 -0500
From:      Nicholas Holley <nickpub@imap.cc>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to query the computer's ip address?
Message-ID:  <40261D14.6070700@imap.cc>
In-Reply-To: <40261B2B.70603@users.sourceforge.net>
References:  <40261B2B.70603@users.sourceforge.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Rob wrote:
> 
> Hi,
> 
> Silly question, maybe, but is there a simple command to query the 
> computer's
> ip address? Something similar to 'hostname' for finding the computer's 
> hostname.
> I need the four dot-separated ip numbers.
> 
> I can analyze the output of 'ifconfig', but isn't there an easier way.
> 
> Thanks,
> Rob.

If reading the output of ifconfig is really too much trouble for you, 
then I would suggest writing up a small script or alias to grep the 
output of ifconfig.

Nick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40261D14.6070700>