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
Method 1 : Using netstat command
sudo netstat -ntlp | grep LISTEN
sudo netstat --tcp --listening --programs --numeric
sudo netstat -tulpn
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
Method 3: Using the ss command