Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Command line for looking at specific port

Is there a way to examine the status of a specific port from the Windows command line? I know I can use netstat to examine all ports but netstat is slow and looking at a specific port probably isn't.

like image 621
user1580018 Avatar asked Aug 17 '12 17:08

user1580018


People also ask

How do I find my port in Command Prompt?

Answer: Open the Run command and type cmd to open the command prompt. Type: “netstat –na” and hit enter. Find port 445 under the Local Address and check the State. If it says Listening, your port is open.

Can you ping specific port?

Because ping doesn't operate over a protocol with port numbers, you cannot ping a particular port on a machine. However, you can use other tools to open a connection to a particular IP and port and obtain the same information you would get if you could ping an IP and port.

What command line tool shows open ports?

Netstat, the TCP/IP networking utility, has a simple set of options and identifies a computer's listening ports, along with incoming and outgoing network connections.


1 Answers

Here is the easy solution of port finding...

In cmd:

netstat -na | find "8080" 

In bash:

netstat -na | grep "8080" 

In PowerShell:

netstat -na | Select-String "8080" 
like image 180
Md. Naushad Alam Avatar answered Sep 20 '22 12:09

Md. Naushad Alam