Essential Linux Network Commands for System Administrators

  1. arp – Manipulate the system ARP cache
    Description: Display or manipulate the ARP cache, which contains information about IP addresses and their corresponding MAC addresses.
    Examples:
    arp
    arp -n
    arp -d 192.168.1.1
  1. arpwatch – Ethernet Activity Monitor
    Description: Monitor Ethernet activity and detect ARP-based attacks or irregularities.
    Examples: No direct command-line examples; typically runs as a background service.
  2. aria2 – Downloading utility supporting various protocols including torrents.
    Description: A versatile download utility capable of handling HTTP, FTP, BitTorrent, and more. Examples:
    aria2c http://example.com/file.zip
    aria2c -x5 http://example.com/largefile.zip
  1. bmon – Bandwidth monitor and rate estimator.
    Description: Monitor network bandwidth usage in real-time.
    Examples: bmon
  1. bwm-ng – Live network bandwidth monitor.
    Description: Another tool for monitoring network bandwidth usage.
    Examples: bwm-ng
  1. curl – Transferring data from or to a server.
    Description: Command-line tool for transferring data with various protocols.
    Examples:
    curl http://example.com
    curl -O http://example.com/file.zip
  1. darkstat – Captures network traffic, usage statistics.
    Description: Network traffic analyzer and usage statistics generator.
    Examples: darkstat
  1. dhclient – Dynamic Host Configuration Protocol Client.
    Description: DHCP client used to obtain IP address and network configuration from a DHCP server. Examples: dhclient eth0
  1. dig – A flexible tool for interrogating DNS name servers.
    Description: Query DNS name servers for DNS records.
    Examples:
    dig google.com
    dig -x 8.8.8.8
  1. fping – Like ping, but allows pinging multiple targets.
    Description: A more versatile version of the ping utility, allowing multiple targets to be pinged simultaneously.
    Examples:
    fping google.com fping -a google.com example.com
  2. host – A simple utility for performing DNS lookups.
    Description: Convert names to IP addresses and vice versa.
    Examples: host google.com host 8.8.8.8
  3. hping3 – Send custom TCP/IP packets and display target replies.
    Description: A powerful tool for sending custom TCP/IP packets and analyzing the responses. Examples: hping3 -c 3 -S -p 80 google.com
  4. ifconfig – Display or configure network interfaces.
    Description: Show or configure network interfaces on a system.
    Examples: ifconfig ifconfig eth0 192.168.1.10 netmask 255.255.255.0
  5. ifstat – Report network interface bandwidth.
    Description: Display bandwidth usage for network interfaces.
    Examples: ifstat
  6. iftop – Display bandwidth usage.
    Description: A real-time console-based bandwidth monitoring tool.
    Examples: iftop
  7. ip – Show or manipulate routing, network devices, interfaces, and tunnels.
    Description: A versatile tool for configuring and managing network interfaces and routing tables. Examples: ip addr show ip route show
  8. iperf3 – Network bandwidth measurement tool.
    Description: Measure network bandwidth between two endpoints.
    Examples: iperf3 -c 192.168.1.2
  9. iproute2 – Collection of utilities for controlling TCP/IP.
    Description: A set of tools for managing various aspects of TCP/IP networking.
    Examples: ip link set eth0 up
  10. iptables / ip6tables – Administration tool for IPv4/IPv6 packet filtering and NAT.
    Description: Configure firewall rules and perform network address translation.
    Examples: iptables -L
  11. IPTraf – An IP Network Monitor.
    Description: Network monitoring tool providing various statistics about IP traffic.
    Examples: iptraf
  12. iputils – Set of small useful utilities for Linux networking.
    Description: Various utilities for testing network connectivity and performance.
    Examples: ping google.com ping -c 3 8.8.8.8
  13. iw – CLI configuration utility for wireless devices.
    Description: Configure wireless network interfaces.
    Examples: iw dev wlan0 scan
  14. jwhois (whois) – Search Whois servers for the object on the command line.
    Description: Query Whois servers for domain registration information.
    Examples: whois google.com
  15. lsof -i – Reveal information about network sockets.
    Description: List open network sockets and associated processes.
    Examples: lsof -i :80
  16. mtr – Network diagnostic tool.
    Description: A combination of traceroute and ping, providing network diagnostic information. Examples: mtr google.com
  17. ncat or nc – Command-line tool for reading, writing, redirecting, and encrypting data across a network.
    Description: A feature-rich networking tool for various network-related tasks.
    Examples: nc -zv google.com 80
  18. netcat – Networking utility for reading/writing network connections.
    Description: A versatile networking utility for various network tasks.
    Examples: netcat -l -p 1234
  19. nethogs – A small ‘net top’ tool.
    Description: Monitor network traffic by process in real-time.
    Examples: nethogs
  20. Netperf – Network bandwidth Testing.
    Description: Test network performance between two systems.
    Examples: netperf -H 192.168.1.2
  21. netplan – Utility for easily configuring networking on a Linux system.
    Description: A modern tool for configuring network interfaces in Linux.
    Examples: netplan apply
  22. netsniff-ng – Swiss army knife for daily Linux network plumbing.
    Description: Collection of tools for network analysis and manipulation.
    Examples: netsniff-ng
  23. netwatch – Monitoring Network Connections.
    Description: Monitor network connections and traffic in real-time.
    Examples: netwatch
  24. ngrep – Grep applied to the network layer.
    Description: A tool for pattern matching within network packets.
    Examples: ngrep -q -W byline 'password' tcp dst port 80
  25. nload – Display network usage.
    Description: A console-based network traffic monitor.
    Examples: nload
  26. nmap – Network discovery and security auditing.
    Description: Port scanner and network exploration tool.
    Examples: nmap -sV 192.168.1.0/24
  27. nmcli – Command-line tool for controlling NetworkManager.
    Description: Manage network connections using NetworkManager from the command line. Examples: nmcli device status
  28. nmtui – Provides a text interface to configure networking by controlling NetworkManager. Description: Text-based UI for configuring network connections using NetworkManager.
    Examples: nmtui
  29. nslookup – Query Internet name servers interactively.
    Description: Interactive tool for querying DNS name servers.
    Examples: nslookup google.com
  30. ping – Used to check for connectivity between end hosts.
    Description: Send ICMP echo requests to network hosts.
    Examples: ping google.com
  31. rarp – Manipulate the system RARP table.
    Description: Manage entries in the Reverse Address Resolution Protocol table.
    Examples: rarp -a
  32. route – Show or manipulate the IP routing table.
    Description: Display or modify the kernel’s IP routing table.
    Examples: route
  33. rsync – Fast, versatile, remote file-copying tool.
    Description: Efficiently synchronize files between systems.
    Examples: rsync -avz /local/dir/ user@remotehost:/remote/dir/
  34. scp – Securely copy files between hosts on a network.
    Description: Securely transfer files between systems using SSH.
    Examples: scp /path/to/local/file user@remotehost:/path/to/destination/
  35. slurm – Network load monitor.
    Description: Monitor network traffic and usage statistics.
    Examples: slurm
  36. snort – Network Intrusion Detection and Prevention System.
    Description: Intrusion detection and prevention system for network security monitoring.
    Examples: snort -A console -q -c /etc/snort/snort.conf
  37. smokeping – Keeps track of your network latency.
    Description: Monitor network latency and packet loss over time.
    Examples: smokeping
  38. socat – Establishes two bidirectional byte streams and transfers data between them.
    Description: Versatile network utility for creating connections between two endpoints.
    Examples: socat TCP4-LISTEN:8080,fork TCP4:localhost:80
  39. speedometer – Measure and display the rate of data across a network.
    Description: Real-time network bandwidth monitor.
    Examples: speedometer -rx eth0
  40. speedtest-cli – Test internet bandwidth using speedtest.net.
    Description: Command-line interface for testing internet speed.
    Examples: speedtest-cli
  41. ss – Utility to investigate sockets.
    Description: Display socket statistics.
    Examples: ss -tuln
  42. ssh – Secure system administration and file transfers over insecure networks.
    Description: Securely access remote systems and transfer files using SSH.
    Examples: ssh user@remotehost
  43. tcpdump – Command-line packet analyzer.
    Description: Capture and analyze network packets.
    Examples: tcpdump -i eth0
  44. tcptrack – Display information about TCP connections on a network interface.
    Description: Real-time TCP connections tracker.
    Examples: tcptrack -i eth0
  45. telnet – User interface to the TELNET protocol.
    Description: Connect to remote hosts using the TELNET protocol.
    Examples: telnet example.com 80
  46. tracepath – Very similar function to traceroute.
    Description: Traceroute-like tool to trace the path packets take to a destination.
    Examples: tracepath google.com
  47. traceroute – Print the route packets trace to a network host.
    Description: Trace the path packets take to reach a destination.
    Examples: traceroute google.com
  48. vnStat – Network traffic monitor.
    Description: Monitor network traffic and bandwidth usage.
    Examples: vnstat -l
  49. websocat – Connection forwarder between web sockets and usual sockets.
    Description: Forward connections between web sockets and standard sockets.
    Examples: websocat ws-l:8080 tcp:localhost:80
  50. wget – Retrieving files using HTTP, HTTPS, FTP, and FTPS.
    Description: Download files from the internet using various protocols.
    Examples: wget http://example.com/file.zip
  51. Wireshark – Network protocol analyzer.
    Description: Analyze and inspect network packets in real-time.
    Examples: No direct command-line examples; typically runs with a graphical interface.
  1. ifup – Bring a network interface up.
    Description: Bring a network interface up and activate it.
    Examples: ifup eth0
  2. ifdown – Take a network interface down.
    Description: Deactivate and bring down a network interface.
    Examples: ifdown eth0
  3. ifquery – Parse interface configuration.
    Description: Retrieve and display information about network interfaces.
    Examples: ifquery -a
  4. UFW (Uncomplicated Firewall) – Firewall management tool.
    Description: Manage firewall rules and configurations easily.
    Examples: ufw enable
  5. netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
    Description: Display various network-related information.
    Examples: netstat -tuln
  6. net-tools – Collection of networking utilities.
    Description: Includes various networking utilities like arp, ifconfig, netstat, and more.
    Examples: netstat -rn
  7. hostname – Show or set the system’s host name.
    Description: Display or set the hostname of the system.
    Examples: hostname
  8. iptunnel – Create and manage IP tunnels.
    Description: Create and manage IP tunnels for encapsulating packets.
    Examples: iptunnel add mytunnel mode gre remote 192.168.1.2 local 192.168.1.1 ttl 255
  9. slattach – Attach a network interface to a serial line.
    Description: Attach a network interface to a serial line for communication.
    Examples: slattach -p slip -s 19200 /dev/ttyS0
  10. mii-tool – View, manipulate media-independent interface status.
    Description: View and manipulate status information for Ethernet interfaces.
    Examples: mii-tool eth0
  11. ipmaddr – Adds, changes, deletes, and displays multicast addresses.
    Description: Manage multicast addresses on network interfaces.
    Examples: ipmaddr add 224.0.0.1 dev eth0
  12. plipconfig – Fine-tune PLIP device parameters.
    Description: Configure Parallel Line Internet Protocol (PLIP) devices.
    Examples: plipconfig -a
  13. nc – Networking utility for reading/writing network connections.
    Description: Command-line tool for reading, writing, and redirecting data across a network. Examples: nc -l -p 1234
  14. ncat – Command-line tool for reading, writing, redirecting, and encrypting data across a network. Description: A feature-rich networking utility for various network-related tasks.
    Examples: ncat -l -p 1234