Listing used ports in Linux

The lsof command can display all open files in Linux. With some filtering you can use it to show all open/utilized ports as well.

lsof -i TCP:443
This command will list all processes, their pids, and user under which the process is running, that are utilizing port 443.

To list all TCP ports, one could use
lsof -i TCP

Type lsof –help for more options.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *