Adding or editing an entry in /etc/hosts

Brian Lunergan ff809 at ncf.ca
Sat Jan 6 02:45:36 UTC 2007


Evening all:

New to using ubuntu having just plunked it into place on my machine today as one 
side of a dual-boot setup, and I'm getting an error on startup saying it can't 
find the hostname I set during the install. When I try to do something with the 
sudo command I get the error spit back:

unable to lookup ubuntu via gethostbyname()

I take it I have to modify /etc/hosts. I can view it using the text editor on 
the desktop but of course it is read only.

It contains one line that reads:

127.0.0.1 localhost

I'm guessing it should read:

127.0.0.1 localhost ubuntu

I have no problem working from a command line. (God Lord. My OS experience on 
the other side of the fence goes back to DOS 3 in MS and PC variants.) I've 
figured out how to log on as root and use the command line to change to /etc, 
but from there I'm lost as to what commands to use. Tried a google hunt but 
nothing useful seemed to turn up.

Any tips, advice, or help in general to solve and get past this would be much 
appreciated.

-- 
Brian Lunergan
Nepean, Ontario
Canada



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0701-1, 2007-01-05
Tested on: 2007-01-05 21:45:45
avast! is copyright (c) 2000-2007 ALWIL Software.
http://www.avast.com







More information about the ubuntu-users mailing list