|
Command
|
Purpose
|
ip addr |
Show IP addresses/interfaces
|
ip addr show eth0 |
Show specific interface
|
ip link |
Show interfaces/link state
|
ip link set eth0 up |
Enable interface
|
ip link set eth0 down |
Disable interface
|
ip -s link |
Interface statistics
|
nmcli device status |
NetworkManager device status
|
nmcli connection show |
Show connections
|
hostname |
Show hostname
|
hostnamectl |
Hostname/system information
|
|
Command
|
Purpose
|
ifconfig |
Interface configuration
|
ifup |
Bring interface up
|
ifdown |
Bring interface down
|
|
Command
|
Purpose
|
ip route |
Display routing table
|
ip route get IP |
Show route used to reach IP
|
ip route add ... |
Add route
|
ip route del ... |
Delete route
|
route -n |
Legacy routing table
|
|
Command
|
Purpose
|
ping HOST |
Test connectivity
|
ping -c 4 HOST |
Send 4 pings
|
tracepath HOST |
Trace network path
|
tracepath HOST |
Trace route to host
|
mtr HOST |
Continuous route/latency test
|
ip neigharp -a|
Command
|
Purpose
|
dig DOMAIN |
DNS lookup
|
dig DOMAIN A |
Query A record
|
dig DOMAIN MX |
Query mail records
|
dig -x IP |
Reverse DNS lookup
|
|
nslookup DOMAIN
|
Basic DNS lookup
|
host DOMAIN |
Simple DNS lookup
|
getend hosts HOST |
Test system name resolution
|
resolvectl status |
DNS resolver status
|
nmclinmtuinetworkctl|
Command
|
Purpose
|
ss |
Display sockets
|
ss -t |
TCP sockets
|
ss -u |
UDP sockets
|
ss -l |
Listening sockets
|
ss -tulpn |
Listening TCP/UDP + processes
|
ss -tan |
TCP connections numerically
|
|
Command
|
Purpose
|
curl URL |
Test HTTP/HTTPS
|
wget URL |
Download/test web resource
|
nc HOST PORT |
Test TCP/UDP port
|
tcpdump |
Capture network packets
|
nmap HOST |
Scan hosts/ports
|
|
Command
|
Purpose
|
ip -s link |
RX/TX statistics
|
ss -s |
Socket summary
|
ethtool |
NIC/link information
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.