Catalog / Networking Commands Cheatsheet
Networking Commands Cheatsheet
A quick reference guide to essential networking commands for troubleshooting, configuration, and monitoring network connectivity. This cheatsheet provides concise information on commonly used commands across various operating systems.
Basic Network Information
IP Configuration
|
Displays IP address, subnet mask, default gateway, and DNS settings. Example:
|
|
Configures network interfaces and displays IP address information. Example:
|
|
Modern replacement for ifconfig, displays detailed IP information. Example:
|
|
Displays the IP address(es) of the host. Example:
|
|
Query DNS server to obtain domain name or IP address mapping, or other DNS records. Example:
|
Routing Information
|
Displays the routing table. Example:
|
|
Also displays the routing table. Example:
|
|
Displays the kernel IP routing table. Example:
|
|
Traces the route packets take to a network host. Example:
|
|
The Windows version of traceroute. Example:
|
Network Statistics
|
Displays all active TCP connections and listening ports. Example:
|
|
Displays active TCP connections and ports (numerical). Example:
|
|
Shows listening TCP and UDP ports with process ID. Example:
|
|
Another utility to investigate sockets. Example:
|
Connectivity Testing
Ping
|
Tests connectivity to a network host. Example:
|
|
Pings the specified host until stopped. Example:
|
|
Sends a specified number of ICMP echo requests. Example:
|
Telnet & Netcat
|
Tests connectivity to a specific port on a host. Example:
|
|
Netcat: versatile tool for network connections. Example:
|
|
Netcat: Listens on a specific port. Example:
|
Pathping (Windows)
|
Provides information about network latency and packet loss at intermediate hops between a source and a destination. Example:
|
Network Configuration
Interface Configuration (Linux)
|
Brings a network interface up. Example:
|
|
Brings a network interface down. Example:
|
|
Assigns an IP address to a network interface. Example:
|
|
Sets the default gateway. Example:
|
Firewall Management
|
Opens a port in the firewall. Example:
|
|
Allows traffic on a specific port. Example:
|
|
Adds a rule to accept TCP traffic on a specific port. Example:
|
Wireless Networking
Wireless Information (Linux)
|
Displays wireless interface configuration. Example:
|
|
Scans for available wireless networks. Example:
|
|
Lists available Wi-Fi networks using NetworkManager. Example:
|
Wireless Connection (Linux)
|
Connects to a Wi-Fi network using NetworkManager. Example:
|
Troubleshooting
When troubleshooting network issues, consider the following:
|