How to List available Interfaces in Linux

This guide will go through how to list available interfaces in Linux. We will go through several commands to list available interfaces in Linux.

List available Interfaces in Linux using IP Command

  • To list available interfaces using the IP command run the example commands below.
ip a

or

ip addr

or

ip link show

Sample output

1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33:  mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:0c:29:c3:bb:0f brd ff:ff:ff:ff:ff:ff
    altname enp2s1
    inet 192.168.171.144/24 brd 192.168.171.255 scope global dynamic noprefixroute ens33
       valid_lft 1419sec preferred_lft 1419sec
    inet6 fe80::b75c:74e1:9a32:d195/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

List available Interfaces in Linux using ifconfig Command

  • Run the ifconfig command below to list interfaces in Linux. Note, the ifconfig is obsolete though it still works on most Linux distros.
ifconfig -a

or

/sbin/ifconfig

Sample output

ens33: flags=4163  mtu 1500
        inet 192.168.171.144  netmask 255.255.255.0  broadcast 192.168.171.255
        inet6 fe80::b75c:74e1:9a32:d195  prefixlen 64  scopeid 0x20
        ether 00:0c:29:c3:bb:0f  txqueuelen 1000  (Ethernet)
        RX packets 127748  bytes 186860359 (186.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35547  bytes 3125415 (3.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 1136  bytes 119436 (119.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1136  bytes 119436 (119.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

List available Interfaces in Linux using netstat Command

  • The netstat command is also another command that can list interfaces in Linux.
netstat -i

Sample output

Kernel Interface table
Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
ens33     1500   128253      0      0 0         35979      0      0      0 BMRU
lo       65536     1223      0      0 0          1223      0      0      0 LRU

List available Interfaces in Linux using nmcli Command

  • List available interfaces in Linux using the nmcli command below.
nmcli device status

Sample output

DEVICE  TYPE      STATE      CONNECTION         
ens33   ethernet  connected  Wired connection 1 
lo      loopback  unmanaged  -- 
  • In case you are using a server without GUI, you will be required to install nmcli command.
sudo apt install network-manager
  • After the installation, start it using the command below.
sudo systemctl start network-manager
  • Then enable it to start on boot.
sudo systemctl enable network-manager
  • You have reached the end of our tutorial on how to list available interfaces in Linux.

Read more about IP Command

Other Tutorials

How to copy a file in Linux

How to find a file in Linux

How to kill a process in Linux

System administrator | Software Developer | DevOps

Leave a Comment