localhost or LAN addresses in /etc/hosts

NoOp glgxg at sbcglobal.net
Fri Dec 12 21:58:59 UTC 2008

On 12/12/2008 10:16 AM, Chris G wrote:
> How does one decide whether to put a machine's name as a localhost
> address or an actual LAN address in /etc/hosts?
> My ubuntu server machine's name is isbd, this appears in three places
> in /etc/hosts at the moment:-
>   isbd    localhost.localdomain   localhost
> isbd

Modify to: localhost isbd.<localdomain> isbd

Note: you can remove '<localdomain> if you have no local windows
network domain (MSHOME, WORKGOUP etc). Then: localhost isbd isbd

The ' localhost isbd' rather than just ' localhost' is
useful if you run samba etc. I've no idea about the rest (dnsmasq).

More information about the ubuntu-users mailing list