Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Feb 2004 23:39:07 +1030
From:      Malcolm Kay <malcolm.kay@internode.on.net>
To:        Rob <nospam@users.sourceforge.net>, freebsd-questions@freebsd.org
Subject:   Re: How to query the computer's ip address?
Message-ID:  <200402082339.07932.malcolm.kay@internode.on.net>
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
On Sun, 8 Feb 2004 21:49, 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.
>

A computer often has a number of associated ip addreses; so it is a bit
difficult. However interfaces usually have a unique address (or at least =
a prime
address) so it makes more sense to think in terms of the ip address of a=20
particular NIC in the machine.

So ifconfig is the most reasonable way to find what ip addresses are=20
associated with your computer.

Malcolm =20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402082339.07932.malcolm.kay>