Linux Command: Check Network Status on Linux

Updated: Jun 9

Linux network management is an important task for Linux admins. We’ll cover the basics of network status via the Linux command line today. These Linux commands below are based on the TCP/IP model. These commands are safe to run without changing any of our network configurations.

Layer 1: The physical layer

  1. # ip link show - check network interface status (up /down)

  2. # ethtool eth0 - ethtool is used for querying settings of an ethernet device like network speed, packet drop info etc

Layer 2: The data link layer

  1. # ip neighbor show - shows the current neighbor table in kernel. (MAC address)

  2. # arp - lists the current contents of the ARP cache without any additional options

Layer 3: The network/internet layer

  1. # ip address show - show the ip address for each network interface

  2. # ifconfig -a - show the ip address for all the network interfaces

  3. # ping

  4. # traceroute

  5. # ip route show - show the route table

  6. # nslookup - DNS lookup for google.

  7. # dig - DNS lookup for

Layer 4: The transport layer

  1. # ss -tunlp4 - get statistics about your network connections

  2. # telnet 3306 - check the remote port status

  3. # nc -u 80 - check the remote port status

  4. # netstat -anpl - check all the network connections

Related Post:

Linux: 5 ways to Check a remote port is open

Check network performance problems on the Linux system