From owner-freebsd-questions@FreeBSD.ORG Sun Feb 8 05:09:11 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCCAD16A75B for ; Sun, 8 Feb 2004 05:09:11 -0800 (PST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 168A743D1D for ; Sun, 8 Feb 2004 05:09:11 -0800 (PST) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp130-138.lns1.adl2.internode.on.net [150.101.130.138])i18D98xC085107; Sun, 8 Feb 2004 23:39:09 +1030 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: Rob , freebsd-questions@freebsd.org Date: Sun, 8 Feb 2004 23:39:07 +1030 User-Agent: KMail/1.4.3 References: <40261B2B.70603@users.sourceforge.net> In-Reply-To: <40261B2B.70603@users.sourceforge.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200402082339.07932.malcolm.kay@internode.on.net> Subject: Re: How to query the computer's ip address? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2004 13:09:12 -0000 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