{"id":85753,"date":"2022-09-06T14:12:41","date_gmt":"2022-09-06T14:12:41","guid":{"rendered":"https:\/\/ded9.com\/?p=85753"},"modified":"2025-12-20T10:38:07","modified_gmt":"2025-12-20T10:38:07","slug":"how-to-use-the-linux-ping-command","status":"publish","type":"post","link":"https:\/\/ded9.com\/de\/how-to-use-the-linux-ping-command\/","title":{"rendered":"How to Use the Linux ping Command: A Practical Guide"},"content":{"rendered":"<p>PING, or Packet Internet Groper, is one of the most popular Linux commands. Its main purpose is to manage the network connection status between the source and the device using an IP network. In this tutorial, you will learn how to use the ping command.<\/p>\n<h2>What is the Linux ping command?<\/h2>\n<p>With the ping command in Linux, we can access the network&#8217;s duration of sending and receiving responses. It works by sending a series of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Internet_Control_Message_Protocol\" target=\"_blank\" rel=\"noopener\">ICMP<\/a> protocol messages to the target <a href=\"https:\/\/ded9.com\/host\/\">host<\/a> and waiting for an ICMP echo message from the host, which informs us that the network is online.<\/p>\n<p>It sends an ECHO_REQUEST message and waits for an ECHO_RESPONSE. If it shows the message &#8220;fast ping, low latency,&#8221; the connection is fast. The speed of this connection is measured in milliseconds.<\/p>\n<p>Due to its many applications, PING is installed by default on every computer, <a href=\"https:\/\/ded9.com\/vps\/\">VPS<\/a>, or modern device. The ping command is a quick and simple way to check performance between a device and a host.<\/p>\n<p>Ping provides detailed connection details for all types of networks, from local area networks (LANs) to wide area networks (WANs). It also receives a statistical summary, including the minimum and maximum rounds, the number of packets sent and received, the percentage of lost packets, and the average standard deviation. In addition, it allows the user to check the quality of the network connection between two devices.<\/p>\n<p>You can determine the following by using the ping command between your computer and the target server:<\/p>\n<ul>\n<li>Status of the target host: reachable or not.<\/li>\n<li>Measurement of round-trip time (host &#8211; computer &#8211; host)<\/li>\n<li>The percentage of lost packages<\/li>\n<\/ul>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-85754 size-full\" src=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/2018-06-20-8.png\" alt=\"You can determine the following by using the ping command between your computer and the target server:\" width=\"650\" height=\"563\" srcset=\"https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/2018-06-20-8.png 650w, https:\/\/ded9.com\/wp-content\/uploads\/2022\/09\/2018-06-20-8-300x260.png 300w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/p>\n<h2>How to install the Linux ping command<\/h2>\n<p>Remember, first, we need to access our VPS using SSH. If you need more guidance on this, visit this link. (Connecting to the server with PuTTY software)<\/p>\n<p>Ping should be installed by default in most Linux versions. To check this, enter the following command in Terminal:<\/p>\n<p><code>ping -V<\/code><\/p>\n<p>If ping is not installed, do it with the following command:<\/p>\n<p><code>apt-get update &amp;&amp; apt-get install -y iputils-ping<\/code><\/p>\n<h2>How to use the Linux ping command?<\/h2>\n<p>Several options in Linux allow the user to test the connection between two networks. We will examine some of them in the following.<\/p>\n<h3>1. Checking Connectivity<\/h3>\n<p>Run this simple and quick command in your system to check the status of the host and the desired server or computer.<\/p>\n<p>In this example, we check the network connection with Ded9.com:<\/p>\n<p>ping Ded9.com<\/p>\n<p>Note: If you are unsure about the host&#8217;s domain, you can use the host&#8217;s IP address or VPS.<\/p>\n<ul>\n<li>Min \u2013 refers to the minimum time to receive a response.<\/li>\n<li>Avg \u2013 shows the average response time.<\/li>\n<li>Min \u2013 indicates the maximum time to receive a response.<\/li>\n<\/ul>\n<p>To stop the ping command in Linux, we need to use Ctrl+C to stop sending packets to the target host. You can use Ctrl+C to stop all terminal processes.<\/p>\n<h3>2. Determine the ECHO_REQUEST number<\/h3>\n<p>The c-command is used to specify the number of requests that the user wants to make.<\/p>\n<p>The syntax is as follows:<\/p>\n<p><code>ping \u2013c * exampledomain.com<\/code><\/p>\n<p>Here * is the number of pings you want to do.<\/p>\n<h3>3. Audible Ping<\/h3>\n<p>The Linux ping -a command creates a beep to check if the host is active and notifies you audibly.<\/p>\n<p>The command will be as follows:<\/p>\n<p><code>ping \u2013an exampledomain.com<\/code><\/p>\n<p>Remember, press Ctrl+C to end the ping process.<\/p>\n<h3>4. Determining distances<\/h3>\n<p>The -i option in Linux allows the user to set the time interval in seconds between each request.<\/p>\n<p>An example of this command:<\/p>\n<p><code>ping \u2013i 2 \u2013c 7 exampledomain.com<\/code><\/p>\n<p>Here you can change the numbers as needed.<\/p>\n<h3>5. Get a summary of the network status with the ping command<\/h3>\n<p>If you just want to get a summary of the network, use the \u2013q option on the Linux terminal command line:<\/p>\n<p><code>ping \u2013c 7 \u2013q exampledomain.com<\/code><\/p>\n<p>In this example, we still use -c 7 to make seven requests, but we only get the summary because of the addition of -q.<\/p>\n<h3>6. Filling the network with the Linux ping command<\/h3>\n<p>The ping command allows users to send 100 or even more commands per second using the following command:<\/p>\n<p><code>ping \u2013f exampledomain.com<\/code><\/p>\n<p>This command is a great option to test how your website or server handles many requests.<\/p>\n<h2>Conclusion<\/h2>\n<p>Ping is a common tool for troubleshooting access to hosts on a network. The ping command helps us find out why a website is not loading and determine the reachability of a network device.<\/p>\n<p>Since it is fast and simple, many users prefer to use it for troubleshooting.<\/p>\n<h2>FAQ<\/h2>\n<div id=\"rank-math-rich-snippet-wrapper\"><div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-1\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What does the Linux ping command do?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The ping command sends ICMP echo requests to a target host to check if it\u2019s reachable and measure round-trip time.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-2\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How do I use ping to check connectivity?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Type ping in a terminal to send continuous requests and review response times.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-3\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How can I limit the number of pings?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use the -c option, for example ping -c 4 , to send a fixed number of echo requests.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>PING, or Packet Internet Groper, is one of the most popular Linux commands. Its main purpose is to manage the network connection status between the source and the device using an IP network. In this tutorial, you will learn how to use the ping command. What is the Linux ping command? With the ping command [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":85757,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[69],"tags":[32,4285],"class_list":["post-85753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-ping"],"acf":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/85753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/comments?post=85753"}],"version-history":[{"count":4,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/85753\/revisions"}],"predecessor-version":[{"id":266333,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/posts\/85753\/revisions\/266333"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media\/85757"}],"wp:attachment":[{"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/media?parent=85753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/categories?post=85753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ded9.com\/de\/wp-json\/wp\/v2\/tags?post=85753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}