On Tue, 08 Feb 2000, Ray Olszewski wrote:
> At 12:40 AM 2/8/00 +0000, Richard Adams wrote:
> >> I'm try to sort out a (simple) way of determining the local hosts IP address
> >> (not the 127 address...
> >
> >ifconfig eth0 | awk -F addr: '{ print $2 }' | cut -f1 -dB
> >
> >I dont know if that will still work for ppp just try it, substute
> >eth0 with ppp0.
> >
> >BTW, someone else said use 'hostname', well most of us know that
> >'hostname' shows your hostNAME and NOT the IP address.
> 
> Actually, he said to use "hostname -i". I tried this and, to my surprise
> (since I "knew" the same thing you did), it worked as promised, displaying
> the IP address of my NIC. According to the man page (yes, it IS mentioned in
> the man page) it will display all the IP addresses of a multi-address host.
> You learn something new every day ....

Yes i have replyed to the gentelman concerned, i did not know either,
however it does not nessasarly show the NIC IP, when i do hostname -i
i get 44.137.28.48 because thats the static IP of pa3gcu.ampr.org
eth0 here is my dhcp NIC and is  212.92.66.77.

But of course it is my hostname.
+ the fact, i did not read the mail on hostname properly.
It was late at night. ;-)

> 
> ------------------------------------"Never tell me the odds!"---
> Ray Olszewski                                        -- Han Solo
> Palo Alto, CA                                  [EMAIL PROTECTED]        
> ----------------------------------------------------------------
-- 
Regards Richard
[EMAIL PROTECTED]
http://people.zeelandnet.nl/pa3gcu/

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to