Listing Network Interfaces
Common Commands for Listing Network Interfaces
1. Using ip
Command
The ip
command is the modern and recommended way to manage network interfaces in Linux.
## List all network interfaces
ip link show
## List brief network interface information
ip addr
## List specific interface details
ip addr show eth0
2. Using ifconfig
Command
While deprecated, ifconfig
is still widely used in older systems:
## List all network interfaces
ifconfig -a
## List specific interface
ifconfig eth0
Network Interface Listing Methods
graph TD
A[Network Interface Listing] --> B[ip command]
A --> C[ifconfig command]
A --> D[/proc/net/dev file]
A --> E[nmcli command]
3. Reading from /proc
Filesystem
## View network interfaces
cat /proc/net/dev
4. Using nmcli
(NetworkManager)
## List network connections
nmcli connection show
## List network devices
nmcli device status
Command |
Purpose |
Detailed Output |
ip link |
List physical interfaces |
Hardware info |
ip addr |
Show IP addresses |
Network configuration |
nmcli |
Network management |
Connection details |
Advanced Filtering Techniques
## Filter only active interfaces
ip link show up
## Show interfaces with specific type
ip link show type ethernet
Best Practices
- Use
ip
command for modern systems
- Understand different listing methods
- Check interface status regularly
Note: LabEx provides hands-on environments to practice these network interface listing techniques in a safe, controlled setting.