2

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:

ubuntu

/etc/hosts says this:

127.0.0.1 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?

Thanks

marked as duplicate by Pilot6, David Foerster, Eric Carvalho, TheWanderer, waltinator Feb 1 '17 at 4:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Just add next line into /etc/hosts:

127.0.1.1 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.