Search Authority

How to List Network Interfaces in Linux - GeeksforGeeks

When you work on a Linux server or local machine, quickly identifying network interfaces helps with troubleshooting and configuration. Learning how to list network interfaces in...

Mara Ellison Aug 08, 2026
How to List Network Interfaces in Linux - GeeksforGeeks

When you work on a Linux server or local machine, quickly identifying network interfaces helps with troubleshooting and configuration. Learning how to list network interfaces in Linux gives you immediate visibility into connectivity, IP assignment, and device naming.

Below is a concise reference that maps out the key commands, expected outputs, and practical options you can use in day-to-day administration.

Command Scope Human Readable Machine Parse Friendly
ip link All interfaces Yes No
ip -brief link All interfaces Yes Partial
ifconfig Active interfaces Yes No
nmcli device status Managed by NetworkManager Yes Partial
ls /sys/class/net Kernel exposed Minimal Yes

Using ip command to list interfaces

The ip tool is the modern replacement for older ifconfig utilities and provides a consistent way to query interface details.

Running ip link shows state, index, and link-layer information for every interface, including those that are down.

Adding the -brief flag produces a compact table with interface names and operational state, similar to a concise version of ifconfig output.

Legacy ifconfig for quick checks

On many older systems and containers, ifconfig is still available and useful for a quick glance at IP addresses and flags.

Default ifconfig behavior

Running ifconfig without arguments displays details for interfaces that are currently active.

Showing all interfaces with ifconfig

Using ifconfig -a reveals interfaces even if they are administratively down or lack an assigned IP.

Using NetworkManager CLI

Systems managed by NetworkManager provide device status and connection profiles through the nmcli utility.

Device status overview

nmcli device status lists every managed device, its type, state, and connection name in a clean columnar view.

Detailed device information

nmcli device show exposes underlying properties such as driver, MAC address, and IPv4 or IPv6 settings.

Exploring the kernel interface

The /sys filesystem exposes raw device attributes that you can use in scripts or for very specific queries.

Listing interfaces via sysfs

Simply listing /sys/class/net returns short interface names without extra metadata, ideal for lightweight checks.

Parsing with standard tools

Piping the sysfs output into while read loops enables custom processing, such as filtering by name pattern or feeding into other scripts.

Key takeaways for listing network interfaces

  • Prefer ip link or ip -brief link for consistent, distribution-agnostic output.
  • Use ifconfig -a when dealing with legacy environments or minimal containers.
  • Leverage nmcli device status on systems managed by NetworkManager for state and connection context.
  • Inspect /sys/class/net for lightweight, script-friendly interface names.
  • Filter by state and device type to match the exact troubleshooting or automation scenario.

FAQ

Reader questions

How do I list only UP interfaces on Linux

Pipe the output of ip -brief link show up or ifconfig to see interfaces that are currently in the UP state with an operational link.

Can I list wireless interfaces separately

Use iw dev or query /sys/class/net/*/type to identify interfaces that expose wireless capabilities and separate them from Ethernet or loopback devices.

What if a command is not found on my system

Install the relevant package, such as iproute2 for ip, net-tools for ifconfig, or ensure NetworkManager tools are present in your distribution.

How do I include VLAN interfaces in the list

VLAN interfaces usually appear in standard listings after the base device; use ip link show type vlan or inspect /sys/class/net to confirm their presence.

Related Reading

More pages in this topic cluster.

Word Scramble Worksheets 15 Free Printables from Worksheetscom

Word scramble worksheets from 15 worksheetscom provide targeted vocabulary practice for students and language learners. These printable activities help users recognize letter pa...

Read next
Circle of Willis Anatomy: The Ultimate Visual Guide

The circle of Willis anatomy serves as a critical cerebral arterial ring that maintains balanced cerebral perfusion. Understanding its precise arrangement helps clinicians antic...

Read next
Simple Handmade Birthday Cards for Husband: Easy & Thoughtful DIY Ideas

Handmade birthday cards for husband add a personal, heartfelt touch to your celebration while showing you truly pay attention to what he loves. Simple designs keep the focus on...

Read next