Checking internet connectivity in Ubuntu

6,334

You can use ping from the terminal. It should be available by default. In Linux, your ping will continue to ping forever. You can use the -c flag to limit the number of pings:

  • ping -c 1 172.16.0.1

After reading the Windows Docs for ping, I understand the -t flag is to make the ping keep pinging forever. As this is the default behavour of ping on Ubuntu, you would simply do the following:

  • ping 172.16.0.1

Check man ping to read up on more options for ping.

Share:
6,334

Related videos on Youtube

wrik003
Author by

wrik003

I'm currently pursuing my Bachelor's in Computer Science & Engineering. Apart from that, I'm a coder, a chess enthusiast, a Math fanatic and a speedcuber. I'm also learning French from time-to-time.

Updated on September 18, 2022

Comments

  • wrik003
    wrik003 almost 2 years

    This is perhaps a noob question. I want to check the status of my internet connection like we do in Windows with "ping 172.16.0.1 -t" where we know there's connection if we get a reply. Is there a similar command in Ubuntu. A google search wasn't really helpful in this case.

  • josh
    josh about 8 years
    To use this command you have to open terminal via ctrl+alt+t