saurabh saurabh - 6 months ago 40
Linux Question

Linux sudo is working slow after changing the hostname

I have changed my hostname in linux mint and after that my sudo works slow I mean how to change the etc/sudoers back again to work properly or there is anything else that I have to change


you probably need to edit /etc/hosts to reflect your new hostname

otherwise it tries to find info about it via DNS (and timeouts, most probably)

look for:  localhost  oldname

and change to:  localhost  newname

Of course change only the line corresponding to oldname. Above I gave an an example of a machine which isn't connected to the net...

Below I give an example of a machine which have an IP:  localhost
a.b.c.d    oldname     <-- just edit that line