The 15 Essential Linux Commands to Manage and Analyze Your Network

In the digital age, mastering network administration under Linux becomes essential for any professional or enthusiast wishing to ensure a secure and efficient environment. In 2025, where connectivity is omnipresent, having a solid arsenal of command line tools seriously facilitates network maintenance, diagnosis, and optimization. This article reveals the 15 essential Linux commands to effectively manage and analyze your network infrastructure, whether you are a beginner or an expert. These tools, often little known outside technical circles, form the basis of an informed sysadmin. Their mastery not only saves time, but also allows you to anticipate and quickly resolve complex network issues.

Discover network configuration in Linux: key commands for a precise overview

Knowing how to visualize the network configuration of a server or Linux workstation is essential. Migration to modern tools like ip a replaces the antique ifconfig, yet still present in certain environments. The syntax evolves, but the principle remains the same: obtain a clear view of your network interfaces, IP addresses, masks, and other essential parameters. Mastering this step is crucial for diagnosing a failure or planning a new architecture.

The ip a command: a must for inspecting your network

Previously, the order ifconfig dominated the world of network configuration under Linux. However, it is now obsolete, replaced by the powerful ip a, which belongs to the suite of utilities basic commands to master in Linux. With this command, each administrator can obtain a detailed view of all interfaces, including those in IPv6.

Order Description Example
ip a Shows all interfaces and IP addresses ip a
ip a show interface Interface-Specific Information ip a show ens33
ip route View the Routing Table ip route show

This table summarizes the essentials for quickly querying configuration and routing, fundamental elements for any network troubleshooting. A precise understanding of routes and interfaces is often the key to unblocking connectivity problems or implementing advanced rules via essential Linux commands. Analyzing Network Connectivity and Pathing: Tools for Effective DiagnosisAnalyzing Network Connectivity and Pathing: Tools for Effective Diagnosis

Network diagnosis relies on the ability to test connectivity between two points. The classic ping command remains a mainstay, allowing you to verify if a machine or server is reachable in a few seconds. However, this tool alone is not sufficient for more complex problems, where the traceroute and mtr tools provide a deeper understanding of traffic flows. Coordinating these commands optimizes the diagnostic process. Ping: The First Response to Test Availability

Used at any time, the ping command sends ICMP packets to a destination to assess its responsiveness. For example, to test connectivity with www.google.com, the syntax is simple: ping www.google.com

ping -c 4 1.1.1.1 (limit to 4 packets) ping -4 address (IPv4) ping -6 address (IPv6) This simple test provides latency, an essential measurement in a network context, and can reveal abnormal losses or delays. If the ping fails, this could point to a route, firewall, or physical connectivity issue. Traceroute and MTR: Mapping a Packet’s Path

While traceroute traces every step, every hop a packet takes towards its destination, mtr combines this capability with regular pings. The My Traceroute tool

offers a dynamic interface, highly valued in 2025 for diagnosing congestion or blockages. Here are some examples of use: traceroute 8.8.8.8 mtr google.com mtr -c 10 -nhost

  • These tools allow you to clearly identify whether a network outage is local or remote, focusing on each intermediate step. Some firewalls or security policies filter these flows, but reading them often remains the best weapon against persistent problems.
  • Analyzing traffic and monitoring active connections: advanced monitoring tools
  • When it comes to observing traffic in real time, a detailed understanding of the connections in place is essential. The ss command is a useful replacement for netstat in its modern version. It lists active sockets quickly and in detail, making it possible to identify suspicious connections or unwanted processes. Using ss to monitor current connections To view all listening or established connections, the most common syntax is: ss -tulnp
  • This output shows open ports, which is essential for security or debugging a service. Reading the “State” column indicates whether a connection is active, listening, or closed. ss Option Function

Example

-t

TCP Sockets ss -t -u UDP Sockets ss -u -l Listening on ports

  1. ss -l
  2. -p
  3. Associated process ss -p

To deal with more advanced or suspicious situations, mastering sudo and its permissions becomes essential for analyzing each open socket in detail.

Capturing and analyzing flows with Tcpdump: the ultimate “scanner”

For a thorough understanding of traffic, tcpdump is the benchmark tool. It intercepts all packets passing through a given interface in real time, with a variety of filters to target a specific flow (protocol, IP, port). For example, to capture only DNS traffic: sudo tcpdump -i ens33 port 53 This allows you to identify the source of problems or detect unauthorized traffic. The capture can then be analyzed with other tools to detect anomalies or tampering. For advanced use, see automation with cron and protecting your files. Performing in-depth investigations of DNS resolution

Performing in-depth investigations of DNS resolution

  • DNS queries are the heart of all internet browsing. Two major tools enable their analysis: nslookup and dig. In 2025, mastering them will be crucial for diagnosing any resolution issues, especially in the presence of complex networks or networks that filter certain traffic. nslookup: Simple but effective for querying DNS servers

With this tool, it’s easy to obtain the IP address of a domain name:

nslookup www.example.com nslookup -query=TXT example.com nslookup example.org 8.8.8.8 (query a specific DNS)
This tool also allows you to perform reverse lookup to verify IP-to-name correspondences. The availability of nslookup on distributions is often ensured by DNS utilities. dig: Power and precision for in-depth querying For advanced resolution, dig remains the essential tool. Its simple syntax allows you to obtain a wealth of information, ranging from a simple IP address to the resolution link:
dig example.com dig @8.8.8.8 example.com dig +trace google.fr (complete DNS resolution tracking)
This tool is particularly valuable for analyzing DNS propagation or name server configuration. More sophisticated, the use of SHA fingerprints guarantees the integrity of transmitted data.
https://www.youtube.com/watch?v=4jlPZtc17l8 Scan and test ports to strengthen security Open ports represent weak points or possible access points for intrusion. Deploying tools like nmap or netcat

facilitates the verification of a network’s security status. These programs also allow you to simulate attacks or test a system’s resilience. Nmap: The “Swiss Army Knife” of Port Scanning In 2025, Nmap continues to be the benchmark for exploring a network or domain. Its ease of use allows for quick or detailed analyses:

nmap -p 22,80,3389 192.168.1.1

nmap -p- 192.168.1.0/24 (full network scan) nmap -sV localhost (detection of service versions) These analyses provide a precise view of potential vulnerabilities, unsecured ports, or obsolete services. Their operation must remain ethical and responsible to avoid any violations.

  • Netcat: The multifunctional tool for port, forwarding, and shell testing

Very practical, Netcat goes beyond simple scanning. It allows you to establish connections, send or receive data, or even launch a remote shell. For example, to test if a port is open: nc -zv 192.168.1.100 80 Or to open a listening session: nc -lvp 2025Used with caution, this tool is an essential tool for any security manager or penetration tester. Its advanced version also allows you to automate test campaigns via cron.

Measuring Network Bandwidth and Performance

Measuring Network Bandwidth and Performance

To ensure optimal connectivity between different machines or sites, throughput measurement is crucial. The iperf tool allows you to verify actual capacity by generating a controlled flow. In 2025, the growth of SaaS services and remote working maximizes the value of these tests for a wide variety of environments. Using iperf to Test Network CapacityThe procedure is simple: one machine is put in server mode, the other in client mode. On the server machine:

iperf -s

And on the client side, test with the server’s IP address:

  • iperf -c 192.168.1.10
  • The results show throughput in Gbps, latency, packet loss, and more. Advanced options allow for precise measurements, such as UDP traffic or extended tests. Knowing your network capacity avoids unpleasant surprises during critical deployments.
  • https://www.youtube.com/watch?v=RkGUWKsE_Ng

Speedtest-cli: the command to test your internet speed Furthermore, withspeedtest-cli

it is possible to measure your internet connection speed via a command line. After installation, a simple

speedtest

  • allows you to view download and upload speeds, with the added bonus of latency. The rapid evolution of analysis tools guarantees effective monitoring of your overall network performance, even remotely.
  • The essential tools for a complete and accurate diagnosis of your Linux network in 2025
  • The commands mentioned offer a complete arsenal for any network administrator. The ability to inspect, diagnose, test, analyze, and optimize a network relies primarily on mastering them. Each tool comes with its own settings, subtleties, and practical applications, which are essential to understand.

By mastering these 15 commands, a professional can often avoid using graphical tools, which are often more cumbersome or less precise. The command line remains the fast, reliable, and secure way to maintain a healthy and efficient network. So, are you ready to take your skills to the next level?