IP address variable

C. Linus Hicks lhicks at nc.rr.com
Wed Feb 16 17:38:11 UTC 2005


On Wed, 2005-02-16 at 11:38 -0500, Matt Morgan wrote:
> On Wed, 16 Feb 2005 09:36:47 -0600, Thomas Cameron
> <thomas.cameron at camerontech.com> wrote:
---<snip>
> > 
> > Why not just use hostname -i?
> 
> This would help me out too, so I tried this. I get 127.0.0.1 :-). How
> can I fix that so that command gives me the address I actually want?
> man hostname doesn't help me. Thanks.

Check your /etc/hosts file. If localhost IP includes your hostname,
that's what you'll get. Change it to this:

127.0.0.1       localhost.<localdomain>   localhost

And if you have a static IP address, and not using a local DNS to
resolve IP addresses, then put a separate line for the address of your
NIC.

-- 
C. Linus Hicks <lhicks at nc dot rr dot com>




More information about the fedora-list mailing list