What Ports??

Oftentimes when debugging some form of online service on Linux if can be handy to know what ports are currently open on the system you are working on. Back “in the day” we got this functionlity via netstat. Unfortunately that has now been deprecated so how do we achieve this.

In short ss

ss -lntu

Will generate similar output to the netstat command and with the -p command you can see the process id that has bound to the port as well.

I recommend using man ss for information on what all the command switches do.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s