local address and hostname on Unix

Bert Freudenberg bert at impara.de
Tue Oct 4 12:48:37 UTC 2005


Am 04.10.2005 um 13:35 schrieb Philippe Marschall:

> Hi
>
> I thought to get the network address and name of the local machine  
> I do:
>
> NetNameResolver localHostName
> NetNameResolver localAddressString
>
> This works on Windows but on Unix it returns just the loopback
> addresses 'localhost' and '127.0.01'. So what is the way to do it on
> Unix?

Edit /etc/hosts to have the name you want to appear first.

See http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-May/ 
040121.html

If you get it working, please add an FAQ entry.

- Bert -




More information about the Squeak-dev mailing list