Linux interview question

How do you find what's listening on a port and which process owns it?

How you'd do it Asked in DevOps Engineer · Site Reliability Engineer (SRE) interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

ss -tlnp lists listening TCP sockets with the owning process (run with sudo to see all processes); sudo lsof -i :8080 shows which process has a given port open. Check the bind address too: 127.0.0.1:8080 is reachable only from the host itself.

Keep reading with a membership

The full answer with examples, key points and comparisons is part of the membership, along with every other interview answer, progress tracking and Daily Review. Most-asked answers stay free to read.

See plans and free trial Already a member? Sign in

More Linux questions

← All Linux questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake