Problem with hostname

2 respostas [Última entrada]
oralfloss
Desconectado
Joined: 06/20/2013

I tried to change my hostname but I had some problems. Here's a list of what happened in order.

I used sudo su to change my hostname with:
sudo su
hostname thinkpad

It worked but I kept getting the error:
sudo: unable to resolve hostname thinkpad

So I tried to change /etc/hostname using gedit:
cd /etc/
gedit hostname

And then I changed the file to say thinkpad.
I got some errors after that but I don't remember them.
After that I rebooted.

I logged in and tried to go sudo su again:
sudo su

But I got the same error:
sudo: unable to resolve hostname thinkpad

When I tried to use gedit to edit the hostname file again, I got some error that I don't remember.

How can I resolve this hostname problem?

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

I believe you need to have those lines in /etc/hosts (to edit with administrative privileges);
::1 thinkpad localhost6.localdomain6 localhost6
127.0.1.1 thinkpad

oralfloss
Desconectado
Joined: 06/20/2013

On 07/21/2013 11:15 PM, name at domain wrote:
> I believe you need to have those lines in /etc/hosts (to edit with
> administrative privileges);
> ::1 thinkpad localhost6.localdomain6 localhost6
> 127.0.1.1 thinkpad
This worked. Thanks