How to ping in linux Find out how to specify the number of packets, the source interface, and the internet protocol with ping options. 217. 101) 56(84) bytes of data. You can run the ping command without any option to check if the server of the target host is up and running. 168. 0. You can use the ping command to test the connection between the local server/computer and a remote UNIX and Linux server. Dec 15, 2023 · To use the ping command in Linux, you simply type ‘ping’ followed by the IP address or domain name of the server you want to test. For example, here, I configured ping to send 5 packets with the -c flag and then used the -q flag to quite the output: ping -q -c 5 itsfoss. 177. Request timeout for icmp_seq 252 . com PING www. 196 Sample Output: ping www. It works by sending the target device a data packet and waiting for the response. . com # On macOS Changing the Packet Size with -s. Apr 2, 2024 · Learn how to use the Linux ping command to test network connectivity and performance. 2. This pings every 60 seconds recording results Mar 18, 2024 · To illustrate, let’s run the ping command using the -f option: $ ping -f localhost PING localhost (127. 1): 56 data bytes . Jul 14, 2023 · You can run a simple ping test to see whether the target host www. To ping an address for 10 seconds and then stop, you would use the -w option (or -t on macOS), like so: ping -w 10 example. For example, to test our website, you can use the website name or IP address. You can also use an IP address instead of the domain name as shown. It then starts sending packets and waits to see if they return. Jun 9, 2025 · In the world of Linux, our network buddy, the ping command, works simply and efficiently. Apr 28, 2025 · The Linux ping command, or packet internet groper, is a utility for diagnosing network issues in a server or network. Ping allows you to test the connectivity between your computer and another device on the network, such as a server or a router. You can also run ping in an infinite loop redirecting output to a file for monitoring: while true; do ping 8. txt; sleep 60; done. google. biz ping 192. It’s called ping flooding and it can be achieved with the -f option. Mar 24, 2022 · The ping command works by sending ICMP packets to the target IP address and listening for returned packets. 196) 56(84) bytes of data. What is Ping in Ubuntu? Mar 7, 2022 · The Ping command allows the user to check the network connection quality between two devices. com Nov 18, 2022 · Different examples to use ping command in Linux 1. When it comes to using the Ping command in Ubuntu, it is important to understand the basics of this powerful network troubleshooting tool. com is reachable or not. com OR $ ping 172. com # On Linux ping -t 10 example. For example . See the syntax, options, and examples of pinging localhost, IPv4, IPv6, and remote hosts. 8. Use carefully!-I interface: Ping from a particular source interface: ping -I eth0 8. Here’s a simple example: Nov 26, 2023 · This can be useful for automating tests in scripts. $ sudo apt install iputils-ping [On Debian, -f: Flood ping constantly for stress/bandwidth testing. Network administrators can modify the ping behavior using various options. The syntax is: ping ip-address ping domain-name ping www. com PING google. Jul 24, 2020 · Learn how to ping a remote IP address using ICMP Echo Request packages and interpret the output. Request timeout for icmp_seq 250 . Sep 27, 2023 · Or you just want to save the output of the ping command by redirecting the output. Mar 26, 2024 · Ping in Different Linux Distributions Ping in Ubuntu. com (108. Jul 24, 2023 · To install the ping command in Linux, use your system’s package manager as shown. $ ping www. This post will show you how to install and use the Ping command on Linux. 27. cyberciti. 122. 254 ping [options] destination ping [options] [IP|hostname] Pass the -c option to the ping command to send out only the number of packets. com (172. By default, ping sends packets of 56 bytes to the The ping command has built-in ‘feature’ for this. We type ping, followed by an IP address or a domain name. Install Ping on Linux. When the destination IP address receives the packet, it responds with an ICMP reply. sudo ping -f google. You’ll need sudo rights to run this option with zero interval. 8 -c 60 >> pinglog. ping command to check the network connectivity of target host. By default, the Ping command is present in most Linux-based distributions. May 8, 2024 · T This page provides examples and syntax for using the UNIX ping command to troubleshoot networking issues in UNIX and Linux by sending ICMP ping-pong requests using the terminal application. Aug 30, 2022 · The ping command in Linux works by sending ICMP packets to the specified hostname or IP address on the network and waits for a connection establishment and a response from the server. Request timeout for icmp_seq 253 Aug 30, 2022 · The ping command in Linux works by sending ICMP packets to the specified hostname or IP address on the network and waits for a connection establishment and a response from the server. Request timeout for icmp_seq 251 . To enable the quiet output with the ping command, use the -q flag as shown: ping -q Target. It’s almost like tossing a ball to a friend, waiting to catch it back. The complete syntax would be, ping [option] domain_or_ip . zqjinddnpyvyfocjameybngszttpxxxnwbjpjkahvzlpoge