sudo: unable to resolve host


I'm setting up my linode and securing my server using the following documentation:

On executing the following command:

sudo chmod +x /etc/network/if-pre-up.d/firewall 

I'm receiving this message:

sudo: unable to resolve host amidala

Any help would be appreciated.

6 Replies

Is 'amidala' a reference to your Linode? Please provide the output from the following two commands: cat /etc/hostname cat /etc/hosts

Many thanks for replying.

[email protected]:~$ cat /etc/hostname
[email protected]:~$ cat /etc/hosts    localhost    ubuntu

# 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

Thanks again


You don't have any reference to 'amidala' in your hosts file. That's why it's not resolving. You may have missed this: … -etc-hosts">

Great, that's fixed it, I must have missed that somehow.

Thanks again for your help. :-)

mine is showing this
[email protected]:~# cat /etc/hostname
[email protected]:~# cat /etc/hosts localhost

The following lines are desirable for IPv6 capable hosts

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct