my terminal takes a while to respond when I use commands with sudo. Any ideas as to what's up with that?

I saw a previous post saying it could be /etc/nsswitch.conf but didn't say what it could be inside that file. Just that it could be the problem. So here is my /etc/nsswitch.conf file:

# /etc/nsswitch.conf
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat systemd
group:          compat systemd
shadow:         compat
gshadow:        files

hosts:          files mdns4_minimal [NOTFOUND=return] dns myhostname
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
  • Just a simple sudo apt-get update takes about a minute to bring up the password prompt for sudo. – aregowe Jun 26 '18 at 18:57
  • Please edit your question instead of burying important information in comments - AskUbuntu is not intended for conversation. – user535733 Jun 26 '18 at 19:01
  • Seems like a duplicate of serverfault.com/questions/38114/… – user535733 Jun 26 '18 at 19:03
  • Is this problem specific to GNOME Terminal? – juniorRubyist Jun 26 '18 at 21:27

This could be the effect of changing the hostname during the installation.

Open the hosts file using:

sudo gedit /etc/hosts

After that, edit it according to the following: localhost localhost.localdomain localhost4 localhost4.localdomain4 <ADD_YOURS_HERE> 
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 <ADD_YOURS_HERE>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.