Linux ping command summary with examples



Community Tested

Why choose wikiHow?
When you see the green checkmark on a wikiHow article, you know that the article has received careful review. In this case, we tested the instructions on our own devices and confirmed that the instructions worked.

How to Ping in Linux

Two Methods:

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.

Steps

Using the Ping Command

  1. Find the IP address of the computer you want to ping.Skip this step if you want to ping a known IP address (e.g., the IP address of a website). You can find the public IP address of the computer by doing the following:
    • Open a web browser on the computer.
    • Go to in the web browser.
    • Review the IP address next to the "Your Public IPv4 is" heading.
  2. Open Terminal on your computer.Click or double-click the Terminal app icon—which resembles a black box with a white ">_" in it—or pressCtrl+Alt+Tat the same time.
  3. Type in the "ping" command.Type inping addresswhere "address" is the IP address or the website you want to ping.
    • For example, to ping Facebook, you would type inping www.facebook.comorping 66.220.144.0.
  4. PressEnter.Doing so will run your "ping" command and begin sending requests to the address.
  5. 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.
  6. Stop the ping process.The "ping" command will run indefinitely; to stop it, pressCtrl+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.

Using the Traceroute Command

  1. Find the IP address of the computer you want to trace.Skip this step if you want to use a known IP address (e.g., the IP address of a website). You can find the public IP address of the computer by doing the following:
    • Open a web browser on the computer.
    • Go to in the web browser.
    • Review the IP address next to the "Your Public IPv4 is" heading.
  2. Open Terminal on your computer.Click or double-click the Terminal app icon—which resembles a black box with a white ">_" in it—or pressCtrl+Alt+Tat the same time.
  3. Type in the "traceroute" command.Type intraceroute addresswhere "address" is 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 intraceroute www.facebook.comortraceroute 66.220.144.0.
  4. PressEnter.This will run the "traceroute" command.
  5. 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.

Community Q&A

Search
  • Question
    From root, can we ping others in Linux?
    wikiHow Contributor
    Community Answer
    Yes, in root or regular user you can.
    Thanks!
  • Question
    How do I stop my machine from pinging other machines?
    wikiHow Contributor
    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.
    Thanks!
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
  • The "ping" command as it's written here can also be used verbatim in the Command Prompt on Windows and the Terminal on Mac.

Warnings

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

Related wikiHows

Article Info

Categories:

In other languages:

Español: , Italiano: , Русский: , Português: , Bahasa Indonesia: , Deutsch: , Français: , Nederlands: , العربية: 

Thanks to all authors for creating a page that has been read 350,682 times.





Video: How-To: Guide to Ubuntu Linux Part 4: Network Commands

How to Ping in Linux
How to Ping in Linux images

2019 year
2019 year - How to Ping in Linux pictures

How to Ping in Linux recommend
How to Ping in Linux forecasting photo

How to Ping in Linux pictures
How to Ping in Linux pics

How to Ping in Linux How to Ping in Linux new photo
How to Ping in Linux new picture

foto How to Ping in Linux
pictures How to Ping in Linux

Watch How to Ping in Linux video
Watch How to Ping in Linux video

Communication on this topic: How to Ping in Linux, how-to-ping-in-linux/
Discussion on this topic: How to Ping in Linux, how-to-ping-in-linux/ , how-to-ping-in-linux/

Related News


Experienced Tourists Tell UsAbout Hotels’ Flaws and Other Troubles You Can Face onAdventures Around the World
Exactly How To Train Yourself To Like Vegetables, Even If You Really Hate Them
How to Figure Out Why Your Child Struggles in School
How to Thicken Beef Stew
A First Timer’s Guide To River Cruise Holidays
How to Deliver Junk Mail
Pippa Middletons wedding diet
Adele hits back at Karl Lagerfeld’s too fat’ insult
Why You Need a Coloured Eyeliner in Your Makeup Bag Right Now
New Opioid Legislation Passed by Congress
How to Have Girl Swag
Top 70 Best Mudroom Ideas – Secondary Entryway Designs
Which is healthier: Smoothies versus Juices
How to Stop an Online Conversation
Kendall Jenner Says Her Pink Wall Makes Her Less Hungry



Date: 01.12.2018, 10:21 / Views: 94462