Checking Connections with ping, traceroute, and mtr
If all worked properly in the preceding section, you should now be able to use the
ping command to check that the interface is responding properly like this (using either
localhost or its IP address):
matthew@seymour:~$ ping -c 3 localhostPING localhost (127.0.0.1) 56(84) bytes of data.64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.154 ms64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.159 ms64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.153 ms--- localhost ping statistics ---3 packets transmitted, 3 received, 0% packet loss, time 1998msrtt min/avg/max/mdev = 0.153/0.155/0.159/0.010 ms
You use the
-c option to set the number of pings, and the command, ...