Linux Show Ethernet Interfaces: Quick Command Guide
In this article
Yes, you can list every Ethernet interface on a Linux system with a single terminal command. The most reliable way is to use the ip link show command, which displays all network devices, their state, MAC address, and other details. If you prefer the older ifconfig utility, you can use ifconfig -a. Both commands work on most distributions, but ip is part of the iproute2 package and is the modern, actively maintained tool.
What You'll Need
- A terminal session with either a local console or SSH access.
- Administrative privileges are optional; most commands run as a normal user, but
ip link showwill display all interfaces regardless of ownership.
Step-by-Step
- Open a terminal. On a desktop, press Ctrl+Alt+T or search for “Terminal” in your application launcher. On a server, SSH in with
ssh user@hostname. - Run the command. Type
ip link showand press Enter. The output will list each interface, its index, state (UP or DOWN), and MAC address. For example:1: lo: LOOPBACK,UP,LOWER_UP mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff - Interpret the output. Each block starts with a number and the interface name. The flags in angle brackets indicate capabilities.
UPmeans the interface is active;LOWER_UPindicates the link layer is detected. If you seeDOWN, the interface is administratively disabled or physically disconnected. - Optional: filter for Ethernet only. To exclude loopback or wireless devices, pipe the output to
grepor use theip -d link show type ethercommand. Example:ip -d link show type ether | grep -E '^[0-9]'will list only Ethernet interfaces. - Alternative with ifconfig. If you prefer the legacy tool, run
ifconfig -a. The output shows each interface with its MAC address and IP configuration. It is still widely available but may be absent on minimal installations.
Common Mistakes
- Assuming the interface name is always
eth0. Modern distributions use predictable naming likeenp3s0orens33. Use the command output rather than hard‑coded names. - Running
ip link showas a non‑root user and then trying to bring an interface up withip link setwithoutsudo. Administrative privileges are required for state changes. - Interpreting
DOWNas a hardware failure. It often simply means the interface is administratively disabled; useip link set eth0 upto enable it.
Tips
- Use
ip -brief link showfor a concise, one‑line summary of each interface. - Combine with
ip -brief addr showto see IP addresses next to interface names. - To save the list for later reference, redirect output to a file:
ip link show > interfaces.txt. - On systems with NetworkManager, you can also run
nmcli device statusto see a higher‑level view of device state.
Troubleshooting
If ip link show returns no output or only lo, the iproute2 package may be missing. Install it with your distribution’s package manager: sudo apt-get install iproute2 on Debian/Ubuntu, sudo dnf install iproute on Fedora, or sudo pacman -S iproute2 on Arch.
When the command runs but shows interfaces as DOWN, check the physical cable or switch port. Use ethtool eth0 to query link status; a response of “Link detected: no” indicates a connectivity problem.
On virtual machines, ensure the network adapter is attached. In VirtualBox or VMware, the VM settings must include a network card of type “Bridged” or “NAT.”
If you see duplicate interface names or missing ones, it could be a kernel module issue. Reload the driver: sudo modprobe -r e1000; sudo modprobe e1000 (replace e1000 with your driver). Verify with dmesg | tail for errors.
Frequently Asked Questions
How do I bring an Ethernet interface up?
Run sudo ip link set eth0 up, replacing eth0 with the actual interface name from the list.
Can I see the IP address with the same command?
Use ip -brief addr show or ifconfig eth0 to display the IP configuration next to the interface name.
What does LOWER_UP mean?
It indicates the link layer (physical or virtual) is detected and active. If missing, the cable or virtual connection is not recognized.
Why does my interface appear as UNKNOWN?
This usually means the kernel has detected the device but cannot determine its state. It may be a driver issue or an unsupported hardware type.
Is ifconfig still safe to use?
Yes, but it is deprecated on many systems. The ip command is the modern replacement and receives regular updates.