View open ports in Linux

Reading Time: < 1 minute

What is Netstat? —  is a common command line TCP/IP networking utility available in most versions of Windows, Linux, UNIX and other operating systems.

Netstat provides information and statistics about protocols in use and current TCP/IP network connections.

netstat command to find open ports.

# netstat --listen

To display open ports and established TCP connections, enter:

$ netstat -vatn

To display only open UDP ports try the following command:

$ netstat -vaun

If you want to see FQDN (full dns hostname), try removing the -n flag:

$ netstat -vat

There are number of tools available today, however, these commands are what I usually use in daily basis.

I hope this will help you out in some ways.


What is Netstat?

What Ports Are Listening / Open On My Linux

Was this post helpful?

Leave a Reply