Raspberry Pi

How to List Network Interfaces on Raspberry Pi

network interface is a point of communication between your system and a private or public network. It is computer hardware that connects your system to network media and can deal with low data range. There are two types of network interfaces, namely physical and virtual interfaces.

The physical interface uses the network interface controller to connect your system to network media, such as an Ethernet cable. The virtual interface doesn’t have a physical existence, but it associates with a physical device. The commonly used virtual interfaces are loopbacks, VLAN, bridges and more.

Through this guide, you will find methods to list network interfaces on Raspberry Pi using different methods.

How to List Network Interfaces on Raspberry Pi

There are five different methods to list network interfaces on Raspberry Pi. All these methods include commands that you should execute in the terminal.

Method 1: List Network Interfaces on Raspberry Pi Through ip Command

The “ip” command is commonly used command for finding the network information on a system. You can use this command to control and manage different network administrative tasks on your system. It also includes information about your network interfaces, which you can get by executing the following command:

$ ip link show

You can also apply the following “ip” command to get the list of network interfaces on your Raspberry Pi terminal.

$ ip address show

Method 2: List Network Interfaces on Raspberry Pi Through nmcli Command

The Network Manager CLI, commonly called nmcli, is a command-line tool used to manage and control network interfaces on your system. With this tool, you can find the network interfaces on your Raspberry Pi system. However, you must ensure that the “Network Manager” is installed on your Raspberry Pi system and if it’s not, you can install it through the following command:

$ sudo apt install network-manager -y

After ensuring that Network Manager is installed on your system, you can run the following command to get the list of network interfaces on the Raspberry Pi system.

$ nmcli device status

You can also apply the following command to get the list of network interfaces on the Raspberry Pi system.

$ nmcli connection show

Method 3: List Network Interfaces on Raspberry Pi Through netstat Command

Network Statistics, commonly referred to as netstat, is another command-line utility that displays the network interface information on your Raspberry Pi system. Besides network interfaces, it also displays a network routing table and incoming and outgoing connections. This command is mainly used for resolving issues related to the network or evaluating the performance of your network.

$ netstat -i

Method 4: List Network Interfaces on Raspberry Pi Through ifconfig Command

The ifconfig command is another important command you can utilize to find the list of network interfaces on your Raspberry Pi system.

$ ifconfig

Method 5: List Network Interfaces on Raspberry Pi Through /sys/class/net

The network interfaces directories are already created inside the “sys/class/net/” location and you can find those directories to get the network interfaces information on your Raspberry Pi system.

$ ls /sys/class/net

Conclusion

To make any changes in the network, you may require the network interface information at some stage. Thus, you need to find the network interface information on your Raspberry Pi system. You can use any of the five methods discussed in the above guidelines, as all are simple to follow. These methods include commands that help you find the list of network interface information on your Raspberry Pi system.A network interface is a point of communication between your system and a private or public network. It is computer hardware that connects your system to network media and can deal with low data range. There are two types of network interfaces, namely physical and virtual interfaces.

The physical interface uses the network interface controller to connect your system to network media, such as an Ethernet cable. The virtual interface doesn’t have a physical existence, but it associates with a physical device. The commonly used virtual interfaces are loopbacks, VLAN, bridges and more.

Through this guide, you will find methods to list network interfaces on Raspberry Pi using different methods.

How to List Network Interfaces on Raspberry Pi

There are five different methods to list network interfaces on Raspberry Pi. All these methods include commands that you should execute in the terminal.

Method 1: List Network Interfaces on Raspberry Pi Through ip Command

The “ip” command is commonly used command for finding the network information on a system. You can use this command to control and manage different network administrative tasks on your system. It also includes information about your network interfaces, which you can get by executing the following command:

$ ip link show

You can also apply the following “ip” command to get the list of network interfaces on your Raspberry Pi terminal.

$ ip address show

Method 2: List Network Interfaces on Raspberry Pi Through nmcli Command

The Network Manager CLI, commonly called nmcli, is a command-line tool used to manage and control network interfaces on your system. With this tool, you can find the network interfaces on your Raspberry Pi system. However, you must ensure that the “Network Manager” is installed on your Raspberry Pi system and if it’s not, you can install it through the following command:

$ sudo apt install network-manager -y

After ensuring that Network Manager is installed on your system, you can run the following command to get the list of network interfaces on the Raspberry Pi system.

$ nmcli device status

You can also apply the following command to get the list of network interfaces on the Raspberry Pi system.

$ nmcli connection show

Method 3: List Network Interfaces on Raspberry Pi Through netstat Command

Network Statistics, commonly referred to as netstat, is another command-line utility that displays the network interface information on your Raspberry Pi system. Besides network interfaces, it also displays a network routing table and incoming and outgoing connections. This command is mainly used for resolving issues related to the network or evaluating the performance of your network.

$ netstat -i

Method 4: List Network Interfaces on Raspberry Pi Through ifconfig Command

The ifconfig command is another important command you can utilize to find the list of network interfaces on your Raspberry Pi system.

$ ifconfig

Method 5: List Network Interfaces on Raspberry Pi Through /sys/class/net

The network interfaces directories are already created inside the “sys/class/net/” location and you can find those directories to get the network interfaces information on your Raspberry Pi system.

$ ls /sys/class/net

Conclusion

To make any changes in the network, you may require the network interface information at some stage. Thus, you need to find the network interface information on your Raspberry Pi system. You can use any of the five methods discussed in the above guidelines, as all are simple to follow. These methods include commands that help you find the list of network interface information on your Raspberry Pi system.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.