You are on page 1of 1

Linux Networking Commands Cheat Sheet

Networking Basics Advanced Networking Network Monitoring DNS and Host Resolution

ifconfig Show or configure network route Show or configure routing netstat Network statistics. dig example.com Perform DNS lookup.
interfaces. table.
netstat -tuln Show active network sockets. nslookup example.com Query DNS servers.
ifconfig eth0 up Activate eth0 network route -n Show routing table (numeric
interface. addresses). netstat -r Show kernel routing table. host example.com Perform DNS lookup.

ip addr Show or change IP addresses. route add default gw Add default route to routing ss Socket statistics. hostname Display hostname.
192.168.1.1 table.
ip addr show Show network interfaces and ss -tuln Show active network sockets. hostname myhost Change hostname.
associated IP addresses. arp Show or change ARP cache.
ss -i Show network interface
ip addr add 192.168.1.1/24 Add IP address with subnet arp -n Show ARP cache (numeric packet statistics. Network Troubleshooting
dev eth0 mask to network interface. addresses).
iftop Real time badwidth usage.
ip link Show or configure network arp -d 192.168.1.100 Remove 192.168.1.100 from ping example.com Send ICMP echo requests.
interfaces. the ARP cache. iftop -n Real time bandwidth usage
(numeric addresses). traceroute example.com Trace route to destination.
ip link show Show network interface iwconfig Manage wireless network
information. interfaces. iftop -i eth0 Real time bandwidth usage tracepath example.com Simplified traceroute.
for eth0 network interface.
ip link set eth0 down Deactivate eth0 network iwconfig wlan0 Show informationn for wlan0 mtr example.com Combines ping and
interface. network interface. tcpdump Network packet analyzer. traceroute functionalities.

ip route Show or change routing curl Download files from the tcpdump -i eth0 Show network traffic on eth0 whois example.com Lookup information for IP or
table. wget internet. network interface. domain.

ip route show Show current routing table. curl -o [link] Download file and save in tcpdump -n port 80 Show network traffic on port
wget [link] current directory. 80 (numeric addresses).
Connectivity
ip route add default via Add default gateway on
192.168.1.1 192.168.1.1.
ifplugstatus eth0 Check if ethernet cable is
plugged in eth0.

You might also like