This article explains how to list network interfaces on Ubuntu Linux.
One can list network interfaces on Ubuntu Linux desktops or servers in multiple ways using multiple commands.
Some commands provide more details than others. However, they are all good, and it’s up to you to select which one fits your needs.
To list network interfaces on Ubuntu Linux, you can use the command “ip link show
“, “nmcli device status
” or “ip addr show
“. These commands will display the IP addresses and network interfaces currently configured on the system.
A popular command previously worked on Ubuntu Linux by default is the ifconfig
command. It is not installed, so you must run the sudo apt install net-tools
packages to get it.
To view more detailed information about a specific network interface, you can use the command “ifconfig <interface name>” or “ip addr show <interface name>.”
This will display information such as the MAC address, MTU, and network settings for that specific interface.
Show network interfaces using the IP command
Users can show the network interfaces on Ubuntu Linux without installing additional packages using the IP
command.
Run the commands below to show the network interfaces on Ubuntu Linux.
ip link show
Show network interfaces using the network manager
Another tool that one can use to display network interfaces on Ubuntu Linux is to use the network manager.
Run the commands below to do that.
nmcli device status
Show network interfaces using netstat
Yet, the netstat command can also display network interfaces on Ubuntu Linux. To do that, run the commands below.
netstat -i
Display network interface using the ifconfig command
A popular command that previously worked on Ubuntu Linux by default is the ifconfig command. It is not installed, so you must run the sudo apt install net-tools
packages to get it.
To view more detailed information about a specific network interface, you can use the command “ifconfig <interface name>” or “ip addr show <interface name>.”
ipconfig
List network interfaces
Finally, users can list the content of the network interfaces folder to list the interfaces. Run the commands below to do that.
ls /sys/class/net/
There might be other commands that are not listed here. However, these should get you started by displaying and listing the network interfaces on Ubuntu Linux.
Conclusion:
- Multiple commands can be used to list network interfaces on Ubuntu Linux, providing varying levels of detail
- Popular commands include “ip link show”, “nmcli device status”, “ip addr show”, and “netstat -i”
- The “ifconfig” command, previously installed by default, now requires the “net-tools” package
- Detailed information about specific network interfaces can be obtained using specific commands such as “ifconfig <interface name>” or “ip addr show <interface name>”
- Another method is to list the content of the network interfaces folder using “ls /sys/class/net/”
- These commands and methods serve as a starting point to display and list network interfaces on Ubuntu Linux
Leave a Reply