Skip to content
Home » How to see all ports in use Linux

How to see all ports in use Linux

Let’s start the discussion about How to see all ports in use Linux in following methods. To fix server issues and avoid security issues, open TCP and UDP ports must be identified. This article will teach you how to use several Linux commands to check open ports in Linux for auditing and securing the server.

See all ports in use – Linux

Use the one of the below command to see all ports that are in use currently. Run any of the below command.

sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN

To see a specific port :

sudo lsof -i:port_number

Under the specific IP :

sudo nmap -sTU -O IP-address-Here

List the all running ports with process id.

$ netstat -ltnp

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : How to stop a process running on a port in Ubuntu