How to View the Network Interfaces in Linux

A Linux server is useless if it cannot communicate with the outside world. Whether you are troubleshooting a disconnected database, setting up a firewall, or configuring a web server to listen on a specific port, your first diagnostic step must be understanding how the server is physically and logically connected to the network. You need to know the names of its network cards (interfaces), their IP addresses, and whether they are actively turned on. To gather this information, Linux administrators rely on a specific set of terminal commands to view the network interfaces.

The Evolution from ‘ifconfig’ to ‘ip’

For over two decades, the standard command to view network information was ifconfig. If you search for old tutorials online, you will see this command referenced constantly. However, ifconfig has been officially deprecated. It struggles to handle modern networking complexities, particularly IPv6. While it still exists on some systems, the modern, universal standard built into every current Linux distribution is the ip command suite.

Step-by-Step: Viewing All Interfaces

The ip command is incredibly powerful, capable of modifying routing tables and managing tunnels, but its most common use is simply displaying the current configuration.

  1. Open your terminal or connect via SSH.
  2. To view all network interfaces and their assigned IP addresses, type:
    ip addr show (Most administrators use the shorthand: ip a)
  3. Press Enter.

Decoding the Output

The output of ip a can appear dense and intimidating, looking like a block of highly technical code. You need to know how to isolate the specific information you need.

The output is divided into numbered sections. Each section represents a different network interface (like a physical Ethernet port or a Wi-Fi card). Look for the following key elements within a section:

  • The Interface Name: This is the very first word after the number.
    • lo: The Loopback interface. This is the server talking to itself (localhost, 127.0.0.1). You can generally ignore this.
    • eth0 or enp3s0: A physical Ethernet cable connection. This is usually your primary connection to the internet.
    • wlan0: A physical Wi-Fi connection.
  • The Status: Look for the phrase state UP or state DOWN. If your ethernet interface says DOWN, the physical cable might be unplugged, or the interface is administratively disabled.
  • The IP Address: Look for the line that begins with inet. The numbers immediately following (e.g., 192.168.1.50/24) represent the IPv4 address assigned to that specific interface. (The line starting with inet6 is the newer IPv6 address).

Viewing a Specific Interface

If a server has six different network cards, running ip a produces too much text to read comfortably. If you already know the name of the interface you want to investigate (e.g., eth0), you can ask the command to display only that specific connection.

  • Type: ip addr show eth0 (or ip a show eth0)
  • Press Enter.

By mastering the ip command, you can instantly verify a server’s network identity and begin diagnosing connectivity issues with precision.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.