sudo: unable to resolve host ubuntu-server

sudo: unable to resolve host ubuntu-server

My /etc/hosts file:       localhost       ubuntu-server

# 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

/etc/hostname gives:


I think there is some other setting that causes the unable to resole host, but I cannot find these.

Edit the /etc/hosts, you have a typo is not loopback, change it to, save and reboot.