Linux Network Commands Cheat Sheet
by itnetsec via cheatography.com/21064/cs/6767/
Linux Network Commands
Command Description
watch ss -tp Network Connections
netstat -ant TCP connections
netstat -anu UDP Connections
netstat -tulpn Connections with PIDs
lsof -i Established Connections
smb://<IP>/<SHARENAME> Access Windows SMB Share
share <USERNAME> <IP> c$ Mount Windows Share
ifconfig <INTERFACE> <IP/CIDR> Set IP and netmask
ifconfig eth0:1 <IP/CIDR> Set virtual interface
route add default gw <IP> Set Default Gateway
ifconfig <INTERFACE> mtu <SIZE> Change MTU size
export MAC=<MACADDRESS> Change MAC Address
ifconfig int hw ether <MACADDRESS> Change MAC Address
dig -x <IP> Domain Lookup IP
host <IP> Domain Lookup IP
dig@<IP> <DOMAIN> -t AXFR DNS Zone Transfer
host -l <DOMAIN> <NAMESERVER> DNS Zone Transfer
echo "1" > /proc/sys/net/ipv4/ip forward Enable IP Forwarding
echo <"NAMESERVER"> > /etc/resolv.conf Add DNS Server
User inputted data is to go between the brackets < >. When you enter the command and supply the input, remove the brackets for the command to run
successfully.
By itnetsec Published 27th January, 2016. Sponsored by CrosswordCheats.com
cheatography.com/itnetsec/ Last updated 27th January, 2016. Learn to solve cryptic crosswords!
Page 1 of 1. http://crosswordcheats.com