Ubuntu: how to correctly change machine name? [duplicate]


This question already has an answer here:

I've changed my machine name through editing /etc/hostname file. but since I did, a weird message appears whenever I sudo:

sudo: unable to resolve host Tehuti  

then it asks for password normally.

What is wrong and is there a correct way to change name with causing problems?


Check in your hosts file(/etc/hosts), for the entry of Set your new hostname there as well. So probably for you: Tehuti


You have to edit /etc/hosts too. Replace old name with new name.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »