Ubuntu Linux view the status of my network Interfaces/card

Posted on in Categories Ubuntu Linux last updated August 8, 2006
Ubuntu Logo

Q. How do I view the status of my network Interface card under Ubuntu Linux ? How do I make sure connectivity exists?

A. You can verify connectivity or status of your network Interfaces/card using standard Linux command. Open your terminal and use following commands:

Ifconfig command use to view status of network Interfaces card or use to configure a network interface itself.

Task: View network interface card

$ sudo ifconfig


$ sudo /sbin/ifconfig


eth0      Link encap:Ethernet  HWaddr 00:0F:EA:91:04:07
      inet addr:  Bcast:  Mask:
      UP BROADCAST MULTICAST  MTU:1500  Metric:1
      RX packets:0 errors:0 dropped:0 overruns:0 frame:0
      TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:1000
      RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
      Interrupt:18 Base address:0xc000

lo        Link encap:Local Loopback
      inet addr:  Mask:
      inet6 addr: ::1/128 Scope:Host
      UP LOOPBACK RUNNING  MTU:16436  Metric:1
      RX packets:14680 errors:0 dropped:0 overruns:0 frame:0
      TX packets:14680 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:0
      RX bytes:7816123 (7.4 MiB)  TX bytes:7816123 (7.4 MiB)

ra0       Link encap:Ethernet  HWaddr 00:17:9A:0A:F6:44
      inet addr:  Bcast:  Mask:
      inet6 addr: fe80::217:9aff:fe0a:f644/64 Scope:Link
      RX packets:41108 errors:0 dropped:0 overruns:0 frame:0
      TX packets:11462 errors:1 dropped:1 overruns:0 carrier:0
      collisions:285 txqueuelen:1000
      RX bytes:9787416 (9.3 MiB)  TX bytes:2871485 (2.7 MiB)

I have total three network interface cards:

  • eth0 – An Ethernet network interface is a communication channel with device connected to network switch or hub. You can transfer files or use internet with eth0.
  • lo – A Lookback interface is communication channel with only one endpoint i.e. it can not be used to communicate with rest of the computer or cannot transfer files.
  • ar0 – This is my wireless communication network interface. You may see other names for your network devices, such as wlan0/ath0 etc for wireless cards.

Line that starts with ‘inet addr:’ displays actual IP address of network interface.

Task: Verify connectivity

To verify the connectivity use the ping command. It send ICMP ECHO_REQUEST to network hosts:

$ ping www.yahoo.com
$ ping www.google.com
$ ping myrouter
$ ping cyberciti.biz


PING cyberciti.biz ( 56(84) bytes of data.
64 bytes from p5w1.geo.re2.yahoo.com ( icmp_seq=0 ttl=51 time=66.5 ms
64 bytes from p5w1.geo.re2.yahoo.com ( icmp_seq=1 ttl=51 time=66.8 ms
64 bytes from p5w1.geo.re2.yahoo.com ( icmp_seq=2 ttl=51 time=67.3 ms
64 bytes from p5w1.geo.re2.yahoo.com ( icmp_seq=3 ttl=51 time=66.5 ms
64 bytes from p5w1.geo.re2.yahoo.com ( icmp_seq=4 ttl=51 time=66.7 ms

--- cyberciti.biz ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 66.535/66.810/67.349/0.299 ms, pipe 2

If you want stop after sending 3 ECHO_REQUEST packets use -c option (useful to write a simple monitoring shell script):

$ ping -c 3 www.yahoo.com

Task: Verify that network interface device is up and running

Following command displays the list of device is up and running

$ sudo ifconfig -s


eth0   1500 0         0      0      0      0        0      0      0      0 BMU
lo    16436 0     16383      0      0      0    16383      0      0      0 LRU
ra0    1500 0     75498      0      0      0    13594      1      1      0 BMRU

If interface is down or not working it will not display much of above information.

6 comment

  1. Another good command (after you have run all the other ones) is “route -n”. It shows how the interfaces would route your packets, depending on the destination address. Good for finding default routes and special routing scenarios in your networking that you didn’t know about, which may explain why certain sites and domains cannot be seen.

  2. i am using i3, which has win7 and ubuntu , the problem is i am able to use wired network on win7 but in ubuntu i am not able to connect in the network connection tab i am not able to see any wired connection , i am new to ubuntu kindly suggest me in learning this kind of issue.


  3. There are times during troubleshooting that you want to see if you have electrical connectivity on your Ethernet interface, i. e. is the thing actually physically plugged in or not. For that, run “sudo ethtool” and look at the last line. If you’re plugged in, it’s “yes”. If not, it’s “no”.

  4. Hello I just installed ubuntu 16.04.1 and now my wifi driver isn’t being detected it won’t even let me try to enable wifi any suggestions on how to fix it

Leave a Comment