How to Check All Open Ports in Ubuntu Linux

If you are using a server or desktop system, then you need to check your or verify your open or listening ports regularly to prevent any unwanted intrusion. This is a good security practice to safeguard your system or server from bad guys. In Ubuntu Linux system you can find out all open ports easily in your terminal application without any third party GUI tools. In this article you will see how to find or determine listening ports on Ubuntu linux system.

List of All Open Ports in Ubuntu Linux

Open your terminal application and run below commands to see all open ports on your Ubuntu system

Also Read:  How to Display Scrolling Text on Screen Using Teleprompter

Method 1 : Using netstat command

sudo netstat -ntlp | grep LISTEN

Check All Open Ports in Ubuntu Linux

sudo netstat --tcp --listening --programs --numeric

Check All Open Ports in Ubuntu Linux

sudo netstat -tulpn

Check All Open Ports in Ubuntu Linux

If the netstat command not working then install net-tools and then try again.

sudo apt install net-tools

Method 2 : Using the lsof command

sudo lsof -nP -i | grep LISTEN

Check All Open Ports in Ubuntu Linux

Method 3: Using the ss command

ss -lnt

Check All Open Ports in Ubuntu Linux

 

Watch Video:

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Leave a Reply