How to Ping on Linux

Today's TipsMake will show you how to test the connection between a Linux computer and another computer using the 'ping' command. You can also use an advanced version of the 'ping' command called 'traceroute' to see which different IP addresses a computer requires to be routed to in order to reach another computer address.

Use the ping command

How to Ping on Linux Picture 1How to Ping on Linux Picture 1

Open Terminal on your computer. Click or double-click the Terminal app icon with a black frame with a white ">_" symbol inside, or you can press Ctrl+ Alt+ T.

How to Ping on Linux Picture 2How to Ping on Linux Picture 2

Enter the "ping" command. Enter pingalong with the website or IP address where you want to test the connection.

For example, to test the connection between Facebook and your computer, you need to enter ping www.facebook.com.

How to Ping on Linux Picture 3How to Ping on Linux Picture 3

Press ↵ Enter. The "ping" command will be executed and begin sending requests to the specific address.

How to Ping on Linux Picture 4How to Ping on Linux Picture 4

See ping speed. To the right of each line appear numbers with "ms" units; this is the number of milliseconds it takes the target computer to respond to your data request.

The smaller the number of seconds, the faster the connection speed between the current computer and another computer/website.

When you ping a web address in Terminal, the second line will display the IP address of the website you are testing. You can take advantage of this to ping websites instead of IP addresses.

How to Ping on Linux Picture 5How to Ping on Linux Picture 5

Stop the ping process. The "ping" command will execute indefinitely; To stop, press Ctrl+ C. This will stop the command and display the ping results below the "^C" line.

To see the average time it takes another computer to respond, look at the number after the first slash (/) in the line below "# packets transmitted, # received".

Use the traceroute command

How to Ping on Linux Picture 6How to Ping on Linux Picture 6

Open Terminal on your computer. Click or double-click the Terminal app icon with a black frame with a white ">_" symbol inside, or press Ctrl+ Alt+ T.

How to Ping on Linux Picture 7How to Ping on Linux Picture 7

Enter the command "traceroute". Enter traceroutealong with the IP address or website you want to track.

For example, to trace the route from your router to the Facebook server, we need to enter traceroute www.facebook.com.

How to Ping on Linux Picture 8How to Ping on Linux Picture 8

Press ↵ Enter. The "traceroute" command will be executed.

How to Ping on Linux Picture 9How to Ping on Linux Picture 9

View the route you requested. To the left of each line that appears is the IP address of the router through which your tracing request is processed. You'll also see the number of milliseconds the process took to happen to the right of the line.

If an asterisk appears in one of the routes, it means that the server to which the computer intended to connect has timed out, in which case another address will be tried.

The traceroute command will time out after reaching the destination.

4 ★ | 2 Vote