Operations
Linux Network Commands
Essential Linux CLI for connectivity, routing, packet capture, firewalls
Connectivity
| ping <host> | Test basic connectivity |
| ping6 <host> | Ping over IPv6 |
| traceroute <host> | Trace path to destination |
| mtr <host> | Live combined ping + traceroute |
| nslookup <domain> | Query DNS |
| dig <domain> ANY | Detailed DNS query (all records) |
| host <domain> | Quick DNS lookup |
| curl -I <url> | Get HTTP response headers |
| wget -qO- ifconfig.me | Get public IP address |
Interfaces & Routing
| ip addr show | Show all interface IPs |
| ip link show | Show link layer info |
| ip route show | Show routing table |
| ip neigh show | ARP/neighbor table |
| ethtool <intf> | NIC details (speed, duplex) |
| nmcli dev status | NetworkManager device status |
| ip link set <intf> up/down | Enable/disable interface |
| ip addr add <ip/cidr> dev <intf> | Add IP to interface |
| ip route add <net> via <gw> | Add static route |
Monitoring & Capture
| ss -tulnp | Show listening ports + processes |
| netstat -an | All connections (legacy) |
| tcpdump -i <intf> | Capture packets on interface |
| tcpdump -i eth0 -c 100 -w capture.pcap | Capture 100 packets to file |
| tcpdump port 53 | Capture DNS traffic only |
| tshark -i <intf> | Wireshark CLI |
| iftop -i <intf> | Live bandwidth monitor |
| nmap -sP 192.168.1.0/24 | Scan subnet for live hosts |
Firewall
| firewall-cmd --list-all | Show firewalld rules |
| firewall-cmd --get-active-zones | Active zones |
| iptables -L -n -v | List iptables rules |
| nft list ruleset | List nftables rules |
| ufw status verbose | UFW firewall status |
File Transfer
| scp file user@host:/path | Secure copy over SSH |
| rsync -avz src/ user@host:/dest/ | Efficient file sync |
| sftp user@host | Interactive SFTP session |
Cisco Console Access
| screen /dev/ttyUSB0 9600 | Connect via screen (most common) |
| minicom -D /dev/ttyUSB0 -b 9600 | Connect via minicom |
| ls /dev | grep -i usb | Find USB serial adapter |
Cisco default serial: 9600 baud, 8 data bits, no parity, 1 stop bit, no flow control (9600 8N1)