I am trying to set up a Ubuntu server on Raspberry Pi 2, but at the moment I am stuck with this:

sudo: unable to resolve host ubuntu

/etc/hostname says this:


/etc/hosts says this: localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I have seen solutions where one can go into recovery mode and change the password and change the hosts, but I don't think I can do that on server version on Raspberry Pi 2. Or can I?



Just add next line into /etc/hosts: ubuntu
  • 1
    I cannot. For that I would need sudo access......and I have to appologize, it worked :) – lapor Dec 7 '16 at 19:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.