Show Menu
Cheatography

Linux Network Commands Cheat Sheet by

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.
 

Comments

Thank you! :)

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Cisco Switch Configuration Cheat Sheet

          More Cheat Sheets by itnetsec