Gaming industry under DDoS attack. Get DDoS protection now. Start onboarding
  1. Home
  2. Developers
  3. How to Display Available Network Interfaces in Linux

How to Display Available Network Interfaces in Linux

  • By Gcore
  • August 11, 2023
  • 2 min read
How to Display Available Network Interfaces in Linux

Understanding Linux network interfaces is vital for tasks like troubleshooting, network configuration, management, and optimization. Interfaces transmit data between a computer and network. By understanding how they work, users can enhance security and tailor the system to specific needs. This skill is foundational for both personal and business networks.

Listing of Network Interfaces in Linux

Here are some common ways to list available interfaces in Linux.

1. Using the ip Command. Displays the status and properties of all network interfaces. It’s a modern command for managing network settings and often preferred in current Linux distributions.

ip addr show

2. Using the nmcli Command.  ‘nmcli’  is a command-line client for NetworkManager, which is often used to manage network connections in modern Linux systems. This command displays the status of all network devices managed by NetworkManager.

nmcli device status

3. Listing the Contents of /sys/class/net Directory. This command lists the contents of the ‘/sys/class/net directory’, where information about all network interfaces is stored in the Linux kernel. It provides a straightforward way to see the names of all available interfaces.

ls /sys/class/net

4. Using the lshw Command. The ‘lshw’ (list hardware) command shows detailed information about the system’s hardware, and the ‘-class network’ option filters the output to only show network-related hardware. This command provides an in-depth view of the network interfaces, including physical details.

lshw -class network

5. Using the iwconfig Command.  Specifically for wireless interfaces, iwconfig displays information related to wireless networking.

iwconfig

6. Using the netstat Command. The ‘netstat’ command provides network statistics. The ‘-i’ option displays a table of all network interfaces.

netstat -i

7. Using the arp Command. The ‘arp’ command displays the Address Resolution Protocol (ARP) cache, which can provide information about network interfaces and IP address associations.

arp -a

8. Using the route Command.  Displays the routing table, which can provide information about network interfaces.

route -n

9. Using the ss Command.  Offers statistics related to network sockets, indirectly providing insight into network interfaces.

ss -s

10. Using the ifconfig Command. This might be deprecated in some modern distributions. Interface Configuration is an older command used to configure and display network interface parameters. The -a option shows all interfaces, even those that are down.

ifconfig -a

Understanding the various methods to display network interfaces in Linux is beneficial, whether you’re a casual user, a system administrator, or a software developer. This list of commands provides key insights into presenting available network connections within Linux.

Conclusion

Looking to deploy Linux in the cloud? With Gcore Cloud, you can choose from Basic VM, Virtual Instances, or VPS/VDS suitable for Linux:

Choose an instance

Related articles

Multi-Cloud Plan: What It Is and How It Works

Your cloud provider goes down. Applications fail. Customers can't access your services. And because you've built everything around a single vendor, there's nothing you can do but wait. For organizations locked into one cloud platform, this

Vendor Lock-In in Cloud Computing: What It Is and How to Avoid It

Imagine discovering that migrating your company's data to a new cloud provider will cost hundreds of thousands of dollars in egress fees alone, before you've even touched the re-engineering work. Or worse, picture being in Synapse Financial

What Is Sovereign Cloud and Why Does It Matter?

Picture this: a foreign government issues a legal order forcing your cloud provider to hand over sensitive patient records, classified research data, or critical national infrastructure details. You can't stop it. This isn't hypothetical. G

Types of Virtualization in Cloud Computing

Your physical servers are sitting idle at 15% to 20% CPU utilization while you're paying for 100% of the power, cooling, and hardware costs. Meanwhile, your competitors have consolidated 10 to 15 applications per server, pushing utilization

What's the difference between multi-cloud and hybrid cloud?

Multi-cloud and hybrid cloud represent two distinct approaches to distributed computing architecture that build upon the foundation of cloud computing to help organizations improve their IT infrastructure.Multi-cloud environments involve us

What is multi-cloud? Strategy, benefits, and best practices

Multi-cloud is a cloud usage model where an organization utilizes public cloud services from two or more cloud service providers, often combining public, private, and hybrid clouds, as well as different service models, such as Infrastructur

Subscribe to our newsletter

Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.