Ports & NetworkManager
Inspecting Ports & Connections
| Command | Shows |
|---|
ss -tulpn | Listening TCP/UDP sockets + PIDs |
ss -s | Socket summary |
ping host | Reachability |
traceroute host | Path to host |
curl -I url | HTTP headers |
$ ss -tulpn | grep :22
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=812))
NetworkManager (nmcli) - persistent config
| Command | Action |
|---|
nmcli device status | Interface overview |
nmcli connection show | List connections |
nmcli con add type ethernet ... | Create a connection |
nmcli con mod <name> ipv4.addresses 192.168.1.5/24 | Set static IP |
nmcli con up <name> | Activate |
Exam tip: ss (socket statistics) replaces the old netstat. ss -tulpn is the one-liner to memorise for "what's listening?".