Catalog / Network Commands Cheatsheet
Network Commands Cheatsheet
A handy reference guide to essential network commands for administration and troubleshooting.
Basic Network Information
IP Configuration
|
Display IP addresses, subnet masks, and interface information. Example:
|
|
Display or configure network interface parameters (deprecated, but still used). Example:
|
|
Display the system’s hostname. Example:
|
|
Display all IP addresses associated with the hostname. Example:
|
|
NetworkManager command-line tool for managing network connections. Example:
|
|
Display or change Ethernet card settings. Example:
|
Routing
|
Display or manipulate the IP routing table. Example:
|
|
Show or manipulate routing, devices, policy routing and tunnels. Example:
|
|
Traces the route packets take to a network host. Example:
|
Network Connectivity
Testing Connectivity
|
Send ICMP ECHO_REQUEST packets to network hosts. Example:
|
|
Connect to a remote system using the Telnet protocol (unencrypted). Example:
|
|
Arbitrary TCP and UDP connections and listens. Good for testing network services. Example:
|
|
Transfer data from or to a server. Example:
|
|
Retrieve files from the web. Example:
|
DNS Lookup
|
Query Internet name servers interactively. Example:
|
|
DNS lookup utility. More powerful and flexible than Example:
|
|
DNS lookup utility for finding the IP address associated with a hostname or vice versa. Example:
|
Network Monitoring
Traffic Monitoring
|
A powerful packet analyzer; it prints a description of the contents of network packets. Example:
|
|
A network protocol analyzer that lets you capture and interactively browse the traffic running on a computer network. (GUI based). Example:
|
|
Displays bandwidth usage on an interface by host. Example:
|
|
Displays network usage in real-time. Example:
|
Connection Monitoring
|
Displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. Example:
|
|
Example:
|
|
List open files. Can be used to find processes using network connections. Example:
|
Firewall Management
iptables
|
List current iptables rules. Example:
|
|
Add a rule to accept SSH traffic. Example:
|
|
Delete a rule. Example:
|
firewalld
|
Check the status of firewalld. Example:
|
|
Open port 80 for HTTP traffic permanently. Example:
|
|
Reload firewalld to apply changes. Example:
|