Linux Network Commands Cheat Sheet

A Software › Linux cheat sheet in English by itnetsec
24,025 views 8,707 downloads 27 Jan 2016 History
4.8 avg · 7 ratings

Linux Network Commands

Command
Descri­ption
watch ss -tp
Network Connec­tions
netstat -ant
TCP connec­tions
netstat -anu
UDP Connec­tions
netstat -tulpn
Connec­tions with PIDs
lsof -i
Establ­ished Connec­tions
smb://­<IP­>/<­SHA­REN­AME>
Access Windows SMB Share
share <US­ERN­AME> <IP> c$
Mount Windows Share
ifconfig <IN­TER­FAC­E> <IP­/CI­DR>
Set IP and netmask
ifconfig eth0:1 <IP­/CI­DR>
Set virtual interface
route add default gw <IP>
Set Default Gateway
ifconfig <IN­TER­FAC­E> mtu <SI­ZE>
Change MTU size
export MAC=<M­ACA­DDR­ESS>
Change MAC Address
ifconfig int hw ether <MA­CAD­DRE­SS>
Change MAC Address
dig -x <IP>
Domain Lookup IP
host <IP>
Domain Lookup IP
dig@<I­P> <DO­MAI­N> -t AXFR
DNS Zone Transfer
host -l <DO­MAI­N> <NA­MES­ERV­ER>
DNS Zone Transfer
echo "­1" > /proc/­sys­/ne­t/i­pv4/ip forward
Enable IP Forwarding
echo <"NA­MES­ERV­ER"> > /etc/r­eso­lv.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 succes­sfully.

Badges

Useful Cheat Sheet Great Cheat Sheet Nice Cheat Sheet Good Cheat Sheet Appreciated Cheat Sheet Downloaded from Unusual Locations × 5

Comments (1)

gamliel 20:00 18 Jul 2017

Thank you! :)

Reply

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.