KandZ – Tuts

We like to help…!

Linux CLI 30 🐧 ping and trace route commands

a - ping command
ping is a network utility that tests the device if is connected on a network
ping google.com → pings google.com. Press Ctrl + C to stop
You can also ping localhost to check the local network
ping 0 or ping 127.0.0.1 or ping localhost
-6 → specifies to request an IPv6 address
-4 → specifies to request an IPv4 address, default
ping -s 500 -1 google.com → -s specifies the packet size and -i specifies the interval
other options: -f → floods a network -c 2 → max packets 2 -w 10 → time limit to 10

b - traceroute command
traceroute shows how packets travel from your computer to another computer through the network
It is useful diagnosing issues with connections and routes
traceroute -4 google.com → uses IPv4 to traceroute. -6 for IPv6
traceroute -m 3 google.com → use maximun 3 hops
traceroute -n google.com → -n disables IP address resolution
Other options: -p 2324 → specifies the port 2324 to use
-q 2 → specifies 2 probes per hop, 50 → specifies the packet length to 50

Leave a Reply