How to show what Ports are being used on Linux

July 31, 2021

To show what ports are being used on your Linux system you can run the ss command:

ss -ltp

Here are the options and their explanation that are added to the ss command:

Display only listening sockets.

Display TCP sockets.

Show the process that is using the socket.