ping: unknown host localhost

On a server, ping localhost did not work

/etc/hosts files was proper, had entry for localhost.

problem was due to /etc/nsswitch.conf file missing in the server. To fix create file

Add

Set permission for the file

Add a Comment

Your email address will not be published. Required fields are marked *