This wikiHow teaches you how to test a connection between your Linux computer and another computer by using the "ping" command. You can also use a more advanced version of the "ping" command that's called "traceroute" to see the different IP addresses your computer's request is routed through to reach the other computer's address.

Method 1
Method 1 of 2:

Using the Ping Command

  1. 1
    Open Terminal on your computer. Click or double-click the Terminal app icon—which resembles a black box with a white ">_" in it—or press Ctrl+Alt+T at the same time.
  2. 2
    Type in the "ping" command. Type in ping followed by the web address or IP address of the website you want to ping.
    • For example, to ping Facebook, you would type in ping www.facebook.com.
    Advertisement
  3. 3
    Press Enter. Doing so will run your "ping" command and begin sending requests to the address.
  4. 4
    Review the ping speed. On the far-right side of each line that appears, you'll see a number followed by "ms"; this is the number of milliseconds it takes for the target computer to respond to your data request.
    • The lower the number, the faster the connection between your computer and the other computer or website.
    • When you ping a web address in the terminal, the second line shows the IP address of the website you are pinging. You can use that to ping a website instead of the IP address.
  5. 5
    Stop the ping process. The "ping" command will run indefinitely; to stop it, press Ctrl+C. This will cause the command to stop running and display the results of the ping below the "^C" line.
    • To see the average time it took for the other computer to respond, look at the number after the first slash (/) in the line below the "# packets transmitted, # received" section.
  6. Advertisement
Method 2
Method 2 of 2:

Using the Traceroute Command

  1. 1
    Open Terminal on your computer. Click or double-click the Terminal app icon—which resembles a black box with a white ">_" in it—or press Ctrl+Alt+T at the same time.
  2. 2
    Type in the "traceroute" command. Type in traceroute followed by the IP address or the website you want to trace.
    • For example, to trace the route from your router to a server for Facebook, you would type in traceroute www.facebook.com.
  3. 3
    Press Enter. This will run the "traceroute" command.
  4. 4
    Review the route your request takes. In the left-hand side of each new line that appears, you should see the IP address of a router through which your trace request is processed. You'll also see the number of milliseconds it took for the process to occur on the far-right side of the line.
    • If you see a line of asterisks appear for one of the routes, it means that the server to which your computer was supposed to connect timed out, thus resulting in a different address being tried.
    • The traceroute command will time out after it reaches its destination.
  5. Advertisement

Community Q&A

  • Question
    From root, can we ping others in Linux?
    Community Answer
    Community Answer
    Yes, in root or regular user you can.
  • Question
    How do I stop my machine from pinging other machines?
    Community Answer
    Community Answer
    In a command prompt, press "Ctrl + C" to end processes in a command line. If you are not actively doing it in a command line, see if your computer is connected to a network or VPN. If not, try to find which kind of device it's pinging and where it is located. If all else fails, either it's nothing or you are being watched/hacked.
  • Question
    How to stop a Linux Mint PC once you have used the ping command?
    Community Answer
    Community Answer
    Cntrl + C will stop the ping if you ever start it. You can do the same to stop just about any process in Linux if you started it via command.
Advertisement

Warnings

  • Not all websites will allow you to ping their true addresses, so your ping results might not always be accurate.
    ⧼thumbs_response⧽
Advertisement

About This Article

Travis Boylls
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 638,341 times.
How helpful is this?
Co-authors: 12
Updated: March 26, 2020
Views: 638,341
Categories: Linux
Article SummaryX

1. Press Ctrl+Alt+T to open the terminal.
2. Type "sudo ping -v" to install Ping Version
3. Type "Ping" followed by the website or IP address you want to ping.
4. Press Enter.

Did this summary help you?
Advertisement