Skip to content

Network

Finding out addresses and routes, testing connections and name resolution, downloading files, configuring interfaces and the firewall, and looking at the traffic itself.

Basics: IP addresses, subnets, ports, DNS and where each distribution keeps its network configuration

Addresses and routes

  • ip


    Interfaces, addresses and routes.

Check connections

  • ping


    Test whether a host answers.

  • traceroute


    Show the route to a host, hop by hop.

  • mtr


    Measure loss and latency per hop.

  • ss


    Listening ports and open connections.

  • nc


    Test ports and talk to services by hand.

DNS

  • dig


    Ask DNS servers directly.

  • host


    Short DNS lookups.

  • resolvectl


    The local resolver of systemd.

HTTP and downloads

  • curl


    Test websites, APIs and certificates.

  • wget


    Download files, resume downloads.

Configure the network

  • nmcli


    NetworkManager on RHEL, Rocky and Alma.

  • netplan


    Network configuration on Ubuntu.

  • ifup


    Bring interfaces up and down on Debian.

Firewall

  • ufw


    Simple firewall of Debian and Ubuntu.

  • firewall-cmd


    firewalld on RHEL, Rocky and Alma.

  • nft


    The packet filter in the kernel.

Capture traffic

  • tcpdump


    Record and inspect network packets.