Up to date linux tools and how to use them

ifconfig vs ip

ifconfig command has been deprecated and replaced by the ip command

# list local interfaces and allocated ips
ip address show

# get layer 2 properties (mac address)
ip link show

# bring device up or down
ip link set DEVICE up
ip link set DEVICE down

netstat vs ss

# show TCP connections
ss -t

# show UDP connections
ss -u

# show listening ports
ss -l

# show all connections with a source port of 22
ss state all sport :ssh

# show only connected sockets
ss state connected sport = :https

# show all connections to a specific host or range
ss state all dst 10.0.0.0/16