I feel stupid for asking this, but I've tried everything I know and can't figure it out.
I can't ping 'localhost'.
My /etc/hosts file:
127.0.0.1 localhost ubun2
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
My nsswitch.conf file:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
ping: unknown host localhost
What am I missing? It's like it's totally ignoring my hosts file, but why? nsswitch lists 'files' as the first option for hosts, so it should hit my hosts file first, right? This just started this week and I don't remember changing a single thing (but I won't deny the possibility).
I first became aware of the problem when I tried to access the machine via NX and it connected and authenticated but then wouldn't finish loading, saying 'nxssh: localhost: Name or service not known'. I approached it as a problem with NX until I noticed that I couldn't even ping localhost on that machine.
So, what's wrong?