How To Check Port Is Open Or Not?

On Linux/macOS: `nc -zv `

On Linux/macOS: `telnet `

On Linux/macOS: `nmap -p `

On Linux/macOS: `curl -v telnet://:`

On Windows PowerShell: `Test-NetConnection -Port `

On Windows CMD: `telnet `

On Windows/Linux/macOS: `nmap -p `

On Linux: `ss -tuln`

On Linux: `netstat -tuln`

On Windows: `netstat -ano`

On Linux: `lsof -i :`

On Linux/macOS: `timeout 3 bash -c ‘/‘ && echo open || echo closed`

On Python: `python -c “import socket; s=socket.socket(); s.settimeout(3); print(s.connect_ex((‘‘, )) == 0)”`

On online port checkers: search for a web-based port checker and test `:`

Suggested for You

Trending Today