Show Menu
Cheatography

Ubuntu Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Network

ifconfig
outdated, use ip addr show
ip addr show
State of all interfaces
ip addr show INTERFACE
State of a specific interface
ip link set INTERFACE up
activates a specific interface
ip link set INTERFACE down
deacti­vates a specific interface
netstat
lists all active sockets
-n
numerical display of addresses and ports
-a
list all types of sockets
-l
list only open sockets (LISTEN)
-t
show only tcp sockets
-u
show only udp sockets
-p
show process id and process name
-e
show extended inform­ation
netstat -tulpen | grep -v 127.0.0.1
show reachable ports for other users over the internet
netstat -tulpen | grep :PORT
filter the list by a specific PORT

grep

command | grep TEXT
searches for TEXT
command | grep -i TEXT
searches for TEXT ignoring upper and lower case