What is this command typically used for?
sudo lsof -i :8080
- Finding which process uses port 8080
- Opening port 8080 in the host firewall
- Sending a test request to port 8080
- Closing every socket on port 8080
lsof -i :PORT lists open network files on that port, including the owning command and PID.