Network Commands Cheatsheet
Essential CLI commands for network troubleshooting and administration
Select Your Operating System
Commands are available for Windows, Linux, and macOS
🚀 Quick Command Reference
Network Diagnostic Commands
Essential commands for testing network connectivity and troubleshooting issues
Test connectivity to a host
ping google.com
ping google.com
ping google.com
Trace route to destination
tracert google.com
traceroute google.com
traceroute google.com
Query DNS servers
nslookup google.com
nslookup google.com
nslookup google.com
Advanced DNS lookup
Not native (use nslookup)
dig google.com
dig google.com
Combination of ping and tracert
pathping google.com
mtr google.com
mtr google.com
Network Configuration Commands
Commands for viewing and modifying network configuration
Display network configuration
ipconfig /all
ifconfig -a
ifconfig -a
Modern Linux network configuration
Not available
ip addr show
Not native
Display/modify routing table
route print
route -n
netstat -rn
Display/modify ARP cache
arp -a
arp -a
arp -a
Network Monitoring Commands
Commands for monitoring network connections and traffic
Display network connections
netstat -an
netstat -tuln
netstat -an
Modern socket statistics
Not available
ss -tuln
Not native
List open files/connections
Not native
lsof -i
lsof -i
Packet capture and analysis
Use Wireshark
tcpdump -i eth0
tcpdump -i en0
Wireless Network Commands
Commands for managing wireless connections
Windows wireless management
netsh wlan show profiles
Use iwconfig/nmcli
Use airport
Linux wireless configuration
Not available
iwconfig
Not available
macOS wireless utility
Not available
Not available
airport -s
Advanced Network Commands
Advanced commands for network administration
Network discovery and security auditing
nmap -sn 192.168.1.0/24
nmap -sn 192.168.1.0/24
nmap -sn 192.168.1.0/24
Transfer data from/to servers
curl https://example.com
curl https://example.com
curl https://example.com
Download files from web
wget https://example.com/file
wget https://example.com/file
wget https://example.com/file
Display or set system hostname
hostname
hostname -f
hostname