I was changing the hostname in Ubuntu 13.10 but after changing the hostname i got this error: “sudo:unable to resolve host Sudeep-Inspiron-3421”.
I got this error because we need to have same hostname in both the file(hosts and hostname). To fix this error type the following in the Terminal to open the file and write the same hostname in both the files (hosts and hostname).
sudo gedit /etc/hosts/
In this file generally the hostname in written in the second line. You will see the first two line similar to this:
Next enter this in the terminal and write the same hostname written in previous file.
Now restart your computer and you will not get the error.