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
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