Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 492 Bytes

File metadata and controls

35 lines (22 loc) · 492 Bytes

Check If A Port Is In Use

We can check if a port is in use or not, by following ways in Linux.

Option 1

lsof

sudo lsof -i -P -n | grep LISTEN

Also, we can check a specific port by running -

sudo lsof -i:{PORT_NUMBER}

Option 2

netstat

sudo netstat -tulpn | grep LISTEN

Option 3

nmap

sudo nmap -sTU -O {IP_ADDRESS}

Source: CyberCiti