{"id":59108,"date":"2023-11-27T15:01:36","date_gmt":"2023-11-27T07:01:36","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=59108"},"modified":"2023-11-26T18:18:55","modified_gmt":"2023-11-26T10:18:55","slug":"linux-command-ping","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/","title":{"rendered":"How to Use the Ping Command in Linux"},"content":{"rendered":"<p>Among the tools utilized in network administration and computer diagnostics, the <code>ping<\/code> command stands out as one of the most fundamental and widely-used. A command-line utility available in virtually every operating system, <code>ping<\/code> serves as a vital diagnostic tool for network engineers, system administrators, and even curious tech enthusiasts.<\/p>\n<p>The <code>ping<\/code> command sends small packets of data to a specified IP address or host, and in return, it expects to receive a reply. By doing so, it helps users determine if a network device is reachable and provides valuable information about the network\u2019s response time and reliability. Whether you\u2019re troubleshooting connectivity issues, monitoring network performance, or just starting your journey into network management, the <code>ping<\/code> command is a must-know.<\/p>\n<p>General syntax for <code>ping<\/code> command:<\/p>\n<pre>\r\nping [IP-ADDRESS]\r\n<\/pre>\n<hr>\n<h3>1. Specify the number of packets<\/h3>\n<pre>ping -c [number] [IP-Address]<\/pre>\n<p>Use the <code>-c<\/code> option to have the ping command automatically stop after a certain number of packets have been sent.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>When you run the <code>ping<\/code> command with the <code>-c 5<\/code> option to send 5 packets to the IP address <code>127.0.0.1,<\/code> you can expect to see an output similar to the following:<\/p>\n<pre>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.\r\n64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.045 ms\r\n64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.058 ms\r\n64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.056 ms\r\n64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.059 ms\r\n64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.057 ms\r\n\r\n--- 127.0.0.1 ping statistics ---\r\n5 packets transmitted, 5 received, 0% packet loss, time 3999ms\r\nrtt min\/avg\/max\/mdev = 0.045\/0.055\/0.059\/0.006 ms\r\n<\/pre>\n<hr>\n<h3>2. Check Localhost network<\/h3>\n<pre>ping localhost<\/pre>\n<p>If you\u2019re having trouble connecting to a remote computer or website, ping the localhost to ensure you\u2019re connected.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>When you execute the <code>ping<\/code> command with <code>localhost<\/code>, you\u2019re essentially pinging your own machine. Here\u2019s a sample output you might see:<\/p>\n<pre>PING localhost (127.0.0.1) 56(84) bytes of data.\r\n64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.033 ms\r\n64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.031 ms\r\n64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.031 ms\r\n64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.030 ms\r\n\r\n--- localhost ping statistics ---\r\n4 packets transmitted, 4 received, 0% packet loss, time 2998ms\r\nrtt min\/avg\/max\/mdev = 0.030\/0.031\/0.033\/0.001 ms\r\n<\/pre>\n<hr>\n<h3>3. Send pings only for a limited period of time<\/h3>\n<pre>ping -i [number] [IP-Address]<\/pre>\n<p>The <code>-i<\/code> option sets the timeout interval in seconds before each packet is sent.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The command <code>ping -i 5 127.0.0.1<\/code> will send <a href=\"https:\/\/www.cloudflare.com\/learning\/ddos\/glossary\/internet-control-message-protocol-icmp\/\" rel=\"nofollow\">ICMP Echo Request<\/a> packets to the loopback address <code>127.0.0.1<\/code> every 5 seconds. Here\u2019s a sample output:<\/p>\n<pre>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.\r\n64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.035 ms\r\n64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.040 ms\r\n64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.038 ms\r\n64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.039 ms\r\n--- 127.0.0.1 ping statistics ---\r\n4 packets transmitted, 4 received, 0% packet loss, time 15005ms\r\nrtt min\/avg\/max\/mdev = 0.035\/0.038\/0.040\/0.007 ms\r\n<\/pre>\n<p>In this example, each request has been replied to in less than a millisecond, and no packets have been lost. The output may vary depending on your system configuration and the current system load.<\/p>\n<hr>\n<h3>4. Flood ping to target host<\/h3>\n<pre>ping -f [IP-address]<\/pre>\n<p>The <code>-f<\/code> option will send the packets as fast as possible. This can flood the network, so it\u2019s often referred to as \u201cflood ping.\u201d It\u2019s mainly used for stress testing and should be used with caution.<\/p>\n<p>Since the packets are sent as fast as possible, there might not be detailed output like the usual ping. Instead, you\u2019ll just see a series of dots, and backspaces might be printed as packets are sent and received.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>A typical output might look something like this:<\/p>\n<pre>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.\r\n..........................................................^C\r\n--- 127.0.0.1 ping statistics ---\r\n468751 packets transmitted, 468750 received, 0% packet loss, time 330ms\r\nrtt min\/avg\/max\/mdev = 0.025\/0.035\/0.139\/0.002 ms, pipe 2, ipg\/ewma 0.182\/0.037 ms\r\n<\/pre>\n<p>Note that the <code>^C<\/code> above represents pressing <span class=\"key\">Ctrl<\/span> + <span class=\"key\">C<\/span> to stop the command. It\u2019s important to know that the flood option does require root privileges, so you may need to run this command with <code><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\">sudo<\/a><\/code> if you\u2019re not the root user.<\/p>\n<hr>\n<h3>5. Change ping packet size<\/h3>\n<pre>ping -s [number] [IP-Address]<\/pre>\n<p>Use the <code>-s<\/code> option to increase the default packet size, you can send light and heavy packets.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>The command <code>ping -s 1000 127.0.0.1<\/code> sends ICMP echo requests to the loopback address <code>127.0.0.1<\/code> with a packet size of 1000 bytes. Here\u2019s an example of what the output might look like:<\/p>\n<pre>PING 127.0.0.1 (127.0.0.1) 1000(1028) bytes of data.\r\n1008 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.050 ms\r\n1008 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.054 ms\r\n1008 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.050 ms\r\n1008 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.054 ms\r\n--- 127.0.0.1 ping statistics ---\r\n4 packets transmitted, 4 received, 0% packet loss, time 3071ms\r\nrtt min\/avg\/max\/mdev = 0.050\/0.052\/0.054\/0.002 ms\r\n<\/pre>\n<hr>\n<h3>6. Display only the summary lines<\/h3>\n<pre>ping -q [IP-Address]<\/pre>\n<p>The <code>-q<\/code> option outputs a single line with the regular ping information, followed by the statistics.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>When you run the <code>ping<\/code> command with the <code>-q<\/code> flag on the loopback address <code>127.0.0.1<\/code>, it sends ICMP ECHO_REQUEST packets to network hosts. The <code>-q<\/code> flag makes the command run in \u201cquiet\u201d mode, where it only displays the summary statistics when finished. The output might look something like this:<\/p>\n<pre>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.\r\n\r\n--- 127.0.0.1 ping statistics ---\r\n10 packets transmitted, 10 received, 0% packet loss, time 8999ms\r\nrtt min\/avg\/max\/mdev = 0.045\/0.057\/0.082\/0.012 ms\r\n<\/pre>\n<hr>\n<h3>7. Set Time Limit for receiving packages<\/h3>\n<pre>ping -w [seconds] [IP-Address]<\/pre>\n<p>This option stops receiving <code>ping<\/code> output after a certain length of time.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>When you run the <code>ping<\/code> command with the <code>-w 10<\/code> option to the loopback address <code>127.0.0.1<\/code>, it sends ICMP echo request packets to the address and waits up to 10 seconds for the replies. Here\u2019s an example output you might see:<\/p>\n<pre>PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.\r\n64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms\r\n64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.040 ms\r\n64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.041 ms\r\n64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.038 ms\r\n...\r\n--- 127.0.0.1 ping statistics ---\r\n10 packets transmitted, 10 received, 0% packet loss, time 8999ms\r\nrtt min\/avg\/max\/mdev = 0.038\/0.041\/0.045\/0.002 ms\r\n<\/pre>\n<h3 style=\"padding-bottom:10px\">More Linux commands:<\/h3>\n<table>\n<tbody>\n<tr>\n<td width=\"150\">Directory Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rm-rmdir\/\"><code>rmdir<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cd\/\"><code>cd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-pwd\/\"><code>pwd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-exa\/\"><code>exa<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ls\/\"><code>ls<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cat\/\"><code>cat<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-cp\/\"><code>cp<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-dd\/\"><code>dd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-less\/\"><code>less<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-touch\/\"><code>touch<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ln\/\"><code>ln<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-rename\/\"><code>rename<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-more\/\"><code>more<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-head\/\"><code>head<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">File System Operations<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-chown\/\"><code>chown<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mkfs\/\"><code>mkfs<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-locate\/\"><code>locate<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Networking<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\"><code>ping<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-curl\/\"><code>curl<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-wget\/\"><code>wget<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-iptables\/\"><code>iptables<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-mtr\/\"><code>mtr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">Search and Text Processing<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-find\/\"><code>find<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-grep\/\"><code>grep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sed\/\"><code>sed<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-whatis\/\"><code>whatis<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ripgrep\/\"><code>ripgrep<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-fd\/\"><code>fd<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-tldr\/\"><code>tldr<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">System Information and Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-env\/\"><code>env<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-history\/\"><code>history<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-top\/\"><code>top<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-who\/\"><code>who<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-htop\/\"><code>htop<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-glances\/\"><code>glances<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-lsof\/\"><code>lsof<\/code><\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"150\">User and Session Management<\/td>\n<td><a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-screen\/\"><code>screen<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-su\/\"><code>su<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-sudo\/\"><code>sudo<\/code><\/a> \u00b7 <a href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-open\/\"><code>open<\/code><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A command-line utility available in virtually every operating system, ping serves as a vital diagnostic tool for network engineers, system administrators, and even curious tech enthusiasts. The ping command sends small packets&hellip;<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[888,3316],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Use the Ping Command in Linux - Hongkiat<\/title>\n<meta name=\"description\" content=\"Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use the Ping Command in Linux\" \/>\n<meta property=\"og:description\" content=\"Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-27T07:01:36+00:00\" \/>\n<meta name=\"author\" content=\"Hongkiat.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hongkiat.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/\"},\"author\":{\"name\":\"Hongkiat.com\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\"},\"headline\":\"How to Use the Ping Command in Linux\",\"datePublished\":\"2023-11-27T07:01:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/\"},\"wordCount\":592,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"keywords\":[\"Linux\",\"Linux Commands\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/\",\"name\":\"How to Use the Ping Command in Linux - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"datePublished\":\"2023-11-27T07:01:36+00:00\",\"description\":\"Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/linux-command-ping\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use the Ping Command in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/7cc686597d92f9086729e4bcc1577ba3\",\"name\":\"Hongkiat.com\",\"description\":\"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).\",\"sameAs\":[\"https:\\\/\\\/www.hongkiat.com\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Use the Ping Command in Linux - Hongkiat","description":"Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/","og_locale":"en_US","og_type":"article","og_title":"How to Use the Ping Command in Linux","og_description":"Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A","og_url":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2023-11-27T07:01:36+00:00","author":"Hongkiat.com","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Hongkiat.com","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/"},"author":{"name":"Hongkiat.com","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3"},"headline":"How to Use the Ping Command in Linux","datePublished":"2023-11-27T07:01:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/"},"wordCount":592,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"keywords":["Linux","Linux Commands"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/","url":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/","name":"How to Use the Ping Command in Linux - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"datePublished":"2023-11-27T07:01:36+00:00","description":"Among the tools utilized in network administration and computer diagnostics, the ping command stands out as one of the most fundamental and widely-used. A","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/linux-command-ping\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Use the Ping Command in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/7cc686597d92f9086729e4bcc1577ba3","name":"Hongkiat.com","description":"This post is published by an HKDC (hongkiat.com) staff. (I.e., intern, staff writer, or editor).","sameAs":["https:\/\/www.hongkiat.com"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/com\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-fnm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=59108"}],"version-history":[{"count":4,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59108\/revisions"}],"predecessor-version":[{"id":68619,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/59108\/revisions\/68619"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=59108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=59108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=59108"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=59108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}