0

When I enter sudo su, I get following error message:

pi@Mapi ~ $ sudo su
sudo: unable to resolve host Mapi

So in the /etc/hosts/ and in the /etc/hostname the hostname Mapi is exact the thame (I also check that there is no space)

pi@Mapi ~ $ cat /etc/hosts
127.0.0.1       localhost localhost.localdomain
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters
127.0.1.1       Mapi

pi@Mapi ~ $ cat /etc/hostname
Mapi

there are no spaces:

/ets/hosts /etc/hostnam

3
  • Please try to edit these files with nano - sudo nano /etc/hostname; sudo nano /etc/hosts - and if there are some green or red colored spaces just remove them. If you have edited these files with a not appropriate text editor, it can be a cause of this problem. If this is true, If I were you I would rewrite the content of these files entirely in nano.
    – pa4080
    Nov 21, 2016 at 14:37
  • Rather than a screenshot of text, please copy-paste the contents of those files directly into your question as an edit instead of as an answer. Please also try not to use screenshots for text, it makes it harder for some of us to read due to screen space being at a premium.
    – Thomas Ward
    Nov 21, 2016 at 16:55
  • The content of the screenshot is included in the question?!? I uploaded the screenshot to make it clear that there are no spaces Nov 22, 2016 at 5:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.