You get a bonus - 1 coin for daily activity. Now you have 1 coin

Unix: Finding Out Which Program Is Using a TCP Port

Practice



To see the list of programs listening on TCP ports, use the following commands.

For FreeBSD:

# sockstat -4


For Linux (Debian, CentOS, as well as Ubuntu, RedHat, etc.):

# netstat -nlp


These commands print a list of programs (services) and the ports they're listening on.
created: 2017-05-10
updated: 2026-03-10
342



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "LINUX operating system"

Terms: LINUX operating system