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

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

What is cloud migration? Benefits, strategy, and best practices

Cloud migration is the process of transferring digital assets, such as data, applications, and IT resources, from on-premises data centers to cloud platforms, including public, private, hybrid, or multi-cloud environments. Organizations can

What is a private cloud? Benefits, use cases, and implementation

A private cloud is a cloud computing environment dedicated exclusively to a single organization, providing a single-tenant infrastructure that improves security, control, and customization compared to public clouds.Private cloud environment

What is a cloud GPU? Definition, types, and benefits

A cloud GPU is a remotely rented graphics processing unit hosted in a cloud provider's data center, accessible over the internet via APIs or virtual machines. These virtualized resources allow users to access powerful computing capabilities

What is cloud networking: benefits, components, and implementation strategies

Cloud networking is the use and management of network resources, including hardware and software, hosted on public or private cloud infrastructures rather than on-premises equipment. Over 90% of enterprises are expected to adopt cloud netwo

Subscribe to our newsletter

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