Wednesday, July 23, 2014

Can’t ping localhost in Linux (Successfully resolved)

Can’t ping localhost in Linux (Successfully resolved)

$ ping localhost
ping: unknown host localhost

below is the solution If you unable to ping localhost in Linux:

==============================================================
/etc/hosts
Verify that the /etc/hosts file has entires for localhost which looks like the following:

127.0.0.1 localhost

::1     localhost ip6-localhost ip6-loopback


/etc/nsswitch.conf
The file /etc/nsswitch.conf requires specific permissions. Verify that it is set to 644.

#chmod 644 /etc/nsswitch.conf

Also verify that /etc/nsswitch.conf has an entry like the following:
hosts:      files dns
==============================================================

3 comments:

TCP/UDP Protocols/Prots & important port numbers in Linux OS

TCP/UDP Protocols/Ports are ranging from 0-65535 so total we have 65536 ports & because of the limitation in TCP/IP stack where the por...