List Open Ports and the Associated Process on CentOS / Redhat

Use the following commands to list the open ports.

sudo netstat -ltn
openport_1

Use the following commands to list the open ports and the associated process / program name

sudo netstat -lptun
openport_2

Quick way to find if a port is open (for example: port 705)
netstat -lnt | awk '$6 == "LISTEN" && $4 ~ ".705"'

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditShare on StumbleUponEmail this to someoneShare on TumblrDigg this

5 thoughts on “List Open Ports and the Associated Process on CentOS / Redhat

  1. This post and many other on your page are very interesting. You should show your content to bigger audience. Thanks.

  2. Your style is really unique compared to other folks I’ve read stuff from.
    Many thanks for posting when you have tthe opportunity, Guess I’ll just bookmark this web site.

Leave a Reply to Lizette Cancel reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">