I'm using Lubuntu 12.04.
I was trying to change my computer name to "main" and I messed up, I'm not sure what to do now.
I was following the directions on this page.
Here's what I did:
sudo leafpad /etc/hostname
I changed the name, then stupidly closed the file, before changing "/etc/hosts"
Now when I try to move on to the next step (sudo leafpad /etc/hosts), or try any command that begins with "sudo" I get this error:
sudo: unable to resolve host main
No protocol specified
No protocol specified
I can see that the problem is that I've changed the hostname, so the computer's bewildered by my efforts to use sudo because now hostname and hosts don't match. All I need to do is change the name in hosts, but of course I can't do that without sudo.
Any ideas?
/etc/hostname
has a single line for me:vasa1-Inspiron-1545
. Also, when using a GUI-editor, usegksudo
orgksu
, notsudo
./etc/hosts
. If you don't know the steps, tell us what's the output ofmount | grep '/ '