Check your Android’s Internet connection

Use Unix / Linux commands to check your Android’s Internet connection.

If your Android web browser can’t display your favorite sites, the device may have lost its IP connection to the Internet. You can check this by using three simple Linux commands. (Android is built upon a Linux foundation.) This requires five steps:

  1. Install the Terminal Emulator app. (You’ll find Terminal Emulator within the Google Play Store on your Android desktop.)
  2. Run Terminal Emulator. Enter the command netcfg (and press Enter). Your current IP address will be displayed in the third column for one of the devices in the first column. On my phone, the Internet interface device is pdp0 (the bottom line in the first screenshot). The fourth column displays your subnet mask.

    IP address check
    Netcfg command
  3. The command netstat -rn will display each active communication session: protocol, bytes in transmit and receive queues, your IP address, a colon followed by the active port, and the IP address and active port of the host with which you’re communicating.
  4. Again, run Terminal Emulator. Type the command ping (and press Enter). Internet node (which is a Google DNS server) should reply. TTL is Time To Live — the number of hops remaining in the packet. Time is the number of milliseconds required for a packet to traverse the route to and from If you’re not connected, you’ll see a message such as Network is unreachable.

    Ping test
    Ping test
  5. Finally, let’s make certain that you have DNS (Domain Name Service). Run Terminal Emulator once more. Type the command ping (and press Enter). If your DNS worked and you have IP connection, Amazon’s server will reply.

This works on my stock T-Mobile Samsung SGH-T679 phone running Android 2.3.6. I have not rooted it, yet. There may be better ways to check Internet connectivity on Android devices. I’m new to Android and still a novice, though I first installed Linux circa 1993. If you know of a better method, please advise me. I wrote this article on my Android phone; it was a struggle, especially when trying to copy and paste. Any text editing suggestions?

Stop pinging!
On my phone, I can abort the pings and return to the command prompt by simultaneously pressing the Volume Down button (on the left edge of the phone) while pressing the Z key on the keyboard. This simulates a Ctrl-Z key sequence from a full-size keyboard.

Restore your last command
To restore your previous command to the command line, press the Volume Down button (on the left edge of the phone) while pressing the P key on the keyboard. This simulates a Ctrl-P key sequence from a full-size keyboard. You can backspace to edit the command. Press Enter to execute the command.

Can’t connect to your mobile phone carrier?
You first need to connect to your carrier’s nearest cell site. Here’s how: Re-connect Android to the Internet

Having trouble reaching one or more hosts?
Use Android’s traceroute command to discover where your packets stop enroute to their destination.

Visit my website:
© Russ Bellew · Fort Lauderdale, Florida, USA · phone 954 873-4695

2 thoughts on “Check your Android’s Internet connection”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s