0% found this document useful (0 votes)
24 views

Linux Network Commands Cheat Sheet: by Via

This document provides a cheat sheet of common Linux network commands and their descriptions. It lists commands for viewing network connections like netstat and lsof, configuring the network like ifconfig and route, changing settings like MTU size and MAC address, performing DNS lookups and zone transfers, and enabling IP forwarding. User inputted data is denoted by angle brackets for use in the commands.

Uploaded by

aior
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Linux Network Commands Cheat Sheet: by Via

This document provides a cheat sheet of common Linux network commands and their descriptions. It lists commands for viewing network connections like netstat and lsof, configuring the network like ifconfig and route, changing settings like MTU size and MAC address, performing DNS lookups and zone transfers, and enabling IP forwarding. User inputted data is denoted by angle brackets for use in the commands.

Uploaded by

aior
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

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

You might also like