I noticed that the terminal recently becomes too slow when I execute a command that needs my password. It takes some seconds to display [sudo] password for ...
Hi I found this answer on another question - The problem is if your hostname is not in your hosts file.
basically, type "hostname" in your terminal. That will tell you what your hostname is.
sudo nano /etc/hosts
then save - and you are done! Sudo should be fast now!
When you change your systems name in Gnome (The part that is displayed in the terminal after the @; e.g.
tobias@newlaptop you might need to update your
needs to be changed to
If you get it right
sudo should work without delay immediately after saving this setting.
Confirmed @Paul Preibisch answer for those who wants more detailed answer
I had this issue for a long time and all I did was to run
hostnamectl | grep -i "static hostname"
this will show you your hostname then copy the value and edit your hosts
sudo vim /etc/hosts
127.0.0.1 yourHostName to it