On 08-Aug-10 13:00:34, Tim Green wrote:
On 8 August 2010 13:46, Chris G cl@isbd.net wrote:
Not very helpful really, I can't add chris to /etc/hosts unless I give chris a static address can I? _The system certainly has 'chris' as its hostname and 'chris' is returned in response to entering the hostname command.
What do others here have in their /etc/hosts file? _I.e. do you have an entry for the name of the system in /etc/hosts as well as specifying it in /etc/hostname?
I have: 127.0.1.1 timspc
Not sure if that was me or Ubuntu 10.04, but it seems to work fine. Tim.
That is a canonical IP address for the local machine, i.e. if you give that address when working in timspc then it will talk to itself.
No other machine anywhere will find timspc using the address 127.0.1.1 since the "127" domain is always the local machine, so other machines would also talk to themselves. The default ("loopback") address for the localhost is 127.0.0.1, but other adresses in the "127" domain may be used for different methods of access from the local machine. Even though I have "127.0.0.1" in my /etc/hosts file, and not "127.0.1.1", if I telnet 127.0.1.1 I still connect to the same local host, so it recognises that 127.0.1.1 refers to itself.
The point of having it in /etc/hosts is so that giving the hostname "timspc" as address will result in the IP address being found. Otherwise you'd always have to give Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 08-Aug-10 Time: 15:25:30 ------------------------------ XFMail ------------------------------