Navigating The Network Management With Unix/Linux Commands//

Jay JethawaJay Jethawa
3 min read

Introduction/

Networking commands in Linux help to manage and troubleshoot network connections. These commands can check connectivity, configure network interfaces, resolve domain names and more. Let's explore these commands with simple explanations, symbols and examples.

Basic Networking Commands/

  1. ping

    • Symbol: ๐Ÿ“ถ

    • Description: Checks if a computer is reachable over the network.

    • Example: ping google.com sends packets to Google and checks the response.

  2. netstat

    • Symbol: ๐Ÿ“Š

    • Description: Shows network connections, routing tables, and interface statistics.

    • Example: netstat -a shows all active connections and listening ports.

  3. ifconfig

    • Symbol: ๐Ÿ’ป

    • Description: Configures network interfaces.

    • Example: ifconfig eth0 shows the configuration of the eth0 interface.

  4. traceroute vs tracepath

    • Symbol: ๐Ÿ›ค๏ธ

    • Description: Tracks the path packets take to reach a destination.

    • Example: traceroute google.com shows each hop to Google.

    • Note: tracepath is similar but doesn't need superuser privileges.

  5. mtr

    • Symbol: ๐Ÿ“ˆ

    • Description: Combines ping and traceroute for network diagnostics.

    • Example: mtr google.com provides a continuous update of the path to Google.

  6. nslookup

    • Symbol: ๐Ÿ”

    • Description: Queries domain name servers.

    • Example: nslookup google.com shows the IP address of Google.

  7. telnet

    • Symbol: ๐Ÿ“ž

    • Description: Connects to remote hosts over TCP.

    • Example: telnet google.com 80 connects to Google's web server.

  8. hostname

    • Symbol: ๐Ÿท๏ธ

    • Description: Displays or sets the system's hostname.

    • Example: hostname shows the current hostname.

  9. ip

    • Symbol: ๐ŸŒ

    • Description: Shows/manages IP addresses and routing.

    • Example: ip addr show displays all IP addresses.

  10. iwconfig

    • Symbol: ๐Ÿ“ก

    • Description: Configures wireless network interfaces.

    • Example: iwconfig wlan0 shows the configuration of the wlan0 wireless interface.

  11. ss

    • Symbol: ๐Ÿ”—

    • Description: Displays socket statistics.

    • Example: ss -tuln shows listening ports and their status.

  12. arp

    • Symbol: ๐ŸŒ

    • Description: Shows/manages the ARP cache.

    • Example: arp -a displays the ARP table.

  13. dig

    • Symbol: ๐Ÿ”ง

    • Description: Queries DNS servers.

    • Example: dig google.com shows detailed DNS information for Google.

  14. nc (netcat)

    • Symbol: ๐Ÿ› ๏ธ

    • Description: Reads and writes data across network connections.

    • Example: nc -zv google.com 80 checks if Google's web server is up.

  15. whois

    • Symbol: ๐Ÿ•ต๏ธ

    • Description: Queries domain registration information.

    • Example: whois google.com shows registration details for Google.

  16. ifplugstatus

    • Symbol: ๐Ÿ”Œ

    • Description: Checks the link status of network interfaces.

    • Example: ifplugstatus eth0 checks if eth0 is connected.

Advanced Networking Commands/

  1. route

    • Symbol: ๐Ÿ›ฃ๏ธ

    • Description: Shows/manages IP routing tables.

    • Example: route -n displays the routing table.

  2. nmap

    • Symbol: ๐Ÿ•ต๏ธโ€โ™‚๏ธ

    • Description: Scans networks and hosts for open ports and services.

    • Example: nmap google.com scans Google for open ports.

  3. wget

    • Symbol: ๐Ÿ“ฅ

    • Description: Downloads files from the web.

    • Example: wget http://example.com/file.txt downloads a file from a website.

  4. watch

    • Symbol: โฒ๏ธ

    • Description: Runs a command at regular intervals.

    • Example: watch -n 5 df -h shows disk usage every 5 seconds.

  5. iptables

    • Symbol: ๐Ÿ”’

    • Description: Manages firewall rules.

    • Example: iptables -L lists current firewall rules.

  6. traceroute

    • Symbol: ๐Ÿ›ค๏ธ

    • Description: Shows the route packets take to a network host.

    • Example: traceroute google.com shows the path to Google.

  7. curl vs wget

Conclusion/

These commands provide powerful tools to manage and troubleshoot network connections in Linux systems. Understanding and using these commands can help you ensure your network operates smoothly and efficiently. Whether you're checking connectivity, configuring interfaces or securing your network. These commands cover a wide range of networking tasks.

0
Subscribe to my newsletter

Read articles from Jay Jethawa directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Jay Jethawa
Jay Jethawa