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:
Code:
127.0.0.1 localhost ubun2
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
My nsswitch.conf file:
Code:
passwd: compat
group: compat
shadow: compat
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
protocols: files
services: files
ethers: files
rpc: files
netgroup: nis
nslookup localhost:
Code:
Server: 192.168.1.254
Address: 192.168.1.254#53
Non-authoritative answer:
Name: localhost
Address: 127.0.0.1
ping localhost:
Code:
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?
/Kevin
Bookmarks