Serve the current directory over HTTP for quick file sharing on the LAN — requires only Python 3.
bash
$ python3 -m http.server 8080
# On a specific interface:
python3 -m http.server 8080 --bind 0.0.0.0
# Then access from another machine:
curl http://<your-ip>:8080/
List all listening TCP/UDP ports and the process that owns them.
bash
$ # All listening sockets + process names:
ss -tulnp
# Or with netstat (older systems):
netstat -tulnp
# Check if a specific port is open:
ss -tulnp | grep ':443'
Access a service running on a remote server as if it were local. Useful for databases, dev servers, etc.
bash
$ # Forward remote port 5432 to local port 5432:
ssh -L 5432:localhost:5432 user@remote-host
# Persistent background tunnel (no shell):
ssh -fNL 8080:localhost:80 user@remote-host