Last Updated on
Insight: How To Find Out What Ports Are Listening In Linux Operating System
In this tutorial, we will show you the various way to find out what ports are listening in a Linux operating system.
Tutorial To Find Out What Ports Are Listening In Linux Operating System
1. Using ss Command
We can use ss command to find out what ports are listening in Linux operating system. It will show all listening ports for TCP and UDP connections.
sudo ss -lntu
2. Using lsof Command
You might be surprised to see this command in this list but yes we can use lsof command to find out the details of the ports.
sudo lsof -i
3. Using Nmap Command
You can use Nmap command to list out the port details.
sudo nmap -n -PN -sT -sU -p- localhost
4. Using Netstat Command
$ sudo netstat -ltup