How to check all open ports in Ubuntu Linux

If you are using a server or desktop system, you should regularly check or confirm open or listening ports to prevent unwanted intrusions. This is a good security measure to protect your system or server from malicious people. On Ubuntu Linux systems, you can easily find all open ports in your terminal application without using any third party GUI tools. This article describes how to find or determine the listening port for your Ubuntu linux system.

List of all open ports on Ubuntu Linux

Open a terminal application and run the following command to see all open ports on your Ubuntu system.

Method 1: Use the netstat command

sudo netstat -ntlp | grep LISTEN

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

Check all open ports on Ubuntu Linux

sudo netstat -tulpn

Check all open ports on Ubuntu Linux

If the netstat command does not work, install net-tools and try again.

sudo apt install net-tools

Method 2: Use the lsof command

sudo lsof -nP -i | grep LISTEN

Check all open ports on Ubuntu Linux

Method 3: Use the ss command

ss -lnt

Check all open ports on Ubuntu Linux

If you like this article, please subscribe to us Youtube channel.. You can also stay connected with us twitter And Facebook..

References: Check total size of directory from Ubuntu command line
It’s a sequel.
..

Sidebar