Show Menu

Linux Network Commands Cheat Sheet by

linux     networking     security

Linux Network Commands

Comm­and
Desc­rip­tion
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:/­/<I­P>/­<SH­ARE­NAM­E>
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@<­IP> <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.c­onf
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.

Download the Linux Network Commands Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/itnetsec_linux-network-commands.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

gamliel gamliel, 20:00 18 Jul 17

Thank you! :)

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          More Cheat Sheets by itnetsec