Windows check port is busy

Possible Duplicate:
How can I see all active connections?

I have some conflict of ports and my WampServer didn’t work, so I have to know which port is used.

Is there a command line command ? or any program to monitor the ports ?

Community's user avatar

asked Jul 20, 2012 at 8:09

Hamed's user avatar

0

To list open ports and listening services, then from within command prompt, type

netstat -a

or

netstat -an

For more details, in command prompt type

netstat ?

answered Jul 20, 2012 at 8:13

Dave's user avatar

DaveDave

25.3k10 gold badges58 silver badges70 bronze badges

Telnet attempts to connect to a server on a port

telnet <hostname> <port>

You will either connect, or not.

Simple tried and true method.

Works on Windows or Linux

answered Jul 20, 2012 at 8:47

Dean Rather's user avatar

Dean RatherDean Rather

2,6679 gold badges33 silver badges41 bronze badges

To get the most information about what ports are open, what state they’re in, and other relevant network information, I would suggest you download nmap. It’s a free network mapper/port scanner, and by typing either nmap -v 127.0.0.1 in Command Prompt or 127.0.0.1 in the «Host» or «Target» field in the GUI counterpart (called Zenmap), you will quickly obtain any information you need about open ports on your computer.

answered Jul 20, 2012 at 9:50

Matt's user avatar

MattMatt

4371 gold badge4 silver badges18 bronze badges

Not the answer you’re looking for? Browse other questions tagged

.

I am working on a Java EE Application in a Windows environment. (I am using Windows 7)

I am using Tomcat Server, unfortunately port number 8080 is busy (used by Oracle). Now I want to assign a different port to Tomcat.

So before changing inside conf/server.xml file, I want to make sure that a certain port is not occupied by any other process and it’s free.

Arjan Tijms's user avatar

Arjan Tijms

37.8k12 gold badges108 silver badges140 bronze badges

asked Jan 11, 2012 at 10:11

You can use «netstat» to check whether a port is available or not.

Use the netstat -anp | find "port number" command to find whether a port is occupied by an another process or not. If it is occupied by an another process, it will show the process id of that process.

You have to put : before port number to get the actual output

Ex
netstat -anp | find ":8080"

Aya Muhammad's user avatar

answered Jan 11, 2012 at 10:20

Aravind's user avatar

AravindAravind

1,0208 silver badges4 bronze badges

12

It’s netstat -ano|findstr port no

Result would show process id in last column

marc_s's user avatar

marc_s

734k176 gold badges1334 silver badges1460 bronze badges

answered Jan 27, 2014 at 2:53

Anup's user avatar

AnupAnup

5014 silver badges2 bronze badges

3

netstat -ano|find ":port_no" will give you the list.
a: Displays all connections and listening ports.
n: Displays addresses and port numbers in numerical form.
o: Displays the owning process ID associated with each connection .

example : netstat -ano | find ":1900"
This gives you the result like this.

UDP    107.109.121.196:1900   *:*                                    1324  
UDP    127.0.0.1:1900         *:*                                    1324  
UDP    [::1]:1900             *:*                                    1324  
UDP    [fe80::8db8:d9cc:12a8:2262%13]:1900  *:*                      1324

answered Sep 12, 2017 at 4:41

Nikhil Shaw's user avatar

Nikhil ShawNikhil Shaw

3342 silver badges7 bronze badges

2

If you prefer Powershell, use this. You will get the name of the process.

PS C:\Users\Administrator> Get-Process -Id (Get-NetTCPConnection -LocalPort 9093).OwningProcess

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
   6021    1464  2760976    2131548     290.39  25512   2 java

The PID is in Id column, and it provides process name, as well.

If no process is using this port, you get a red error message.

If you want to kill the process with PID 25512, use

taskkill /PID 25512 /F

/F means force, some processes cannot be killed without /F

answered Sep 3, 2021 at 6:13

fall's user avatar

fallfall

98411 silver badges34 bronze badges

0

It’s (Get-NetTCPConnection -LocalPort «port no.»).OwningProcess

answered Jul 10, 2017 at 11:14

Shivam Tiwari's user avatar

1

If this is a purely local concern e.g. you want to run tomcat locally to test the application you’re working on, something which often works is to configure port 0. In that case when the application port-binds it will be allocated a random «ephemeral» port by the OS, which hopefully it logs out.

You’ll have to check if that’s supported by tomcat, but I would expect it is given past answers mentioning it.

It avoids having to hardcode ports and issues of TOCTOU, though it is obviously somewhat less convenient as you need to get the port you need to connect to every time.

The alternative is to just try out a bunch of free ports e.g. 8000[0] and 8888 are common alternate ports for HTTP servers. 8008 is also an official IANA alternate port though I can’t remember ever seing it used.

[0] though officially assigned to iRDMI

answered Sep 3, 2021 at 6:23

Masklinn's user avatar

MasklinnMasklinn

35.6k3 gold badges38 silver badges58 bronze badges

If someone is trying in windows 10 pro, netstat -anp might not list any connection, so try netstat -an and add | find to find your desire port

for example I want to check in port 65432 is being currently used then I do

netstat -an|find "65432"

answered Apr 20 at 19:04

mechbaral's user avatar

1

netstat -ano| grep

this will give status of the port if being used or not

answered Apr 23, 2022 at 12:18

krishnazden's user avatar

krishnazdenkrishnazden

1,12710 silver badges19 bronze badges

At any one time, there’s a whole bunch of information being sent between your Windows 10 PC and the endless void of the Internet. This is done using a process whereby network-dependent processes seek out TCP and UDP ports, which they use to communicate with the Internet. First, your data gets sent to remote ports at the destination or website your processes are trying to connect to, then it gets received at local ports back on your PC.

Most of the time, Windows 10 knows how to manage ports and ensure that traffic is being directed through the right ports so that those processes can connect with what they need to. But sometimes two processes may be assigned to one port, or maybe you just want to get a better picture of your network traffic and what’s going in and out.

That’s why wrote this guide that shows you how to check open ports on Windows and see which applications are using which ports.

Also read: How to Set Up Port Forwarding in Windows

Check Port Usage With Nirsoft CurrPorts

NirSoft is one of the best indie software developers, giving us great utilities, like PassView and WirelessKeyView. While some people will prefer checking their ports without installing third-party software (in which case, scroll down to the CMD method), CurrPorts is easily the fastest and most convenient way to check port status on Windows.

Check Open Ports Windows Currports

Once you’ve installed CurrPorts, just open it to see a list of all your ports currently in use. If you’re looking for local ports in use, just click the «Local Port» column at the top to order the list by port number (handy if you’re looking for a specific one). You can do the same thing with remote ports, too.

If you want to really find specific ports, click the «Advanced Filters» icon at the top and enter your string in the format they suggest. It should look something like the below image.

Check Open Ports Windows Currports Filters

Hit OK when you’re ready, and the list will filter down to your queries.

Also read: How to Open Ports and Set Up Port Forwarding on Your Router

List Open Ports Using the Command Prompt

The integrated — though not necessarily the simplest — way to check open ports is to use the trusty command prompt.

Click the Start button, type cmd, then right-click «Command Prompt» when it shows up in the search results. Click «Run as administrator.»

Once you’re in the elevated command prompt, enter the following command:

This will steadily bring up a list of open ports that is probably quite long, along with the Windows processes that are using them. (You can press Ctrl + A , then Ctrl + C to copy all information to the clipboard.) On the average PC, there will be two main local IP addresses that contain ports on your PC.

check-ports-in-use-windows-10-127-0-0-1

The first, in our case, is «127.0.0.1.» This IP address is otherwise known as «localhost» or a «loopback address,» and any process listening to ports here is communicating internally on your local network without using any network interface. The actual port is the number you see after the colon. (See image below.)

check-ports-in-use-windows-10-port-number

The bulk of your processes will probably be listening to ports prefixed with «192.168.xxx.xxx,» which is your IP address. This means the processes you see listed here are listening for communications from remote Internet locations (such as websites). Again, the port number is the number after the colon.

check-ports-in-use-windows-10-192-168-x-x

Also read: How to Disable USB Ports in Windows 10

Install TCPView to Check Open Ports

If you don’t mind installing a third-party app and want to have more control over what’s going on with all your ports, you can use a lightweight app called TCPView. This immediately brings up a list of processes and their associated ports.

check-ports-in-use-windows-10-tcpview

What make this better than the command prompt is that you can actively see the ports opening, closing and sending packets. Just look for the green, red and yellow highlights. You can also reorder the list by clicking the column headings, making it easier to find the process you want or two separate processes vying for the same port.

If you do find a process or connection you want to close, just right-click that process. You can then select «End process,» which is exactly the same function as the one in Windows task manager. Or you can click «Close Connection» to leave the process open but stop it from listening on a given port.

check-ports-in-use-windows-10-end-process

If you’re having some trouble in Windows 10, then see whether a Windows update may be causing it. We also have a handy guide for managing the health of your hard drive in Windows 10.

Robert Zak

Tech writer at Make Tech Easier. Enjoys Android, Windows, and tinkering with retro console emulation to breaking point.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

  1. How do you check what port is being used?
  2. How can I tell if port 22 is open?
  3. How do I know if port 443 is open?
  4. Should I open port 80?
  5. How do you verify ports 80 and 443 are open?
  6. Is port 80 open by default?
  7. How can I tell if a port is busy?
  8. What is port 443 commonly used for?
  9. Can you ping a port?

How do you check what port is being used?

Type “netstat -a” without the quotation marks and press the “Enter” key. A list of data appears. The first column signifies the protocol type used, while the second column displays a list of local connections that are in use. The number that appears after the colon in this column is the port that is in use.

How can I tell if port 22 is open?

Using ‘netstat -ab’ to Identify Open Ports

Now, type “ netstat -ab ” without quotes, then press “Enter.” Wait for the results to load. Port names get listed next to each local IP address. Look for the port number you need, and if it says LISTENING in the State column, it means your port is open.

How do I know if port 443 is open?

You can use netstat command to list the tcp port, if 443 port is listed there and state is established means 443 is open for outbound communication.

Should I open port 80?

Allowing port 80 doesn’t introduce a larger attack surface on your server, because requests on port 80 are generally served by the same software that runs on port 443. … Closing port 80 doesn’t reduce the risk to a person who accidentally visits your website via HTTP.

How do you verify ports 80 and 443 are open?

You can test whether the port is open by attempting to open an HTTPS connection to the computer using its domain name or IP address. To do this, you type https://www.example.com in your web browser’s URL bar, using the actual domain name of the server, or https://192.0.2.1, using the server’s actual numeric IP address.

Is port 80 open by default?

Note: TCP Port 80 is open for outgoing communications by default in most firewall software. So you should not have to open any ports in the firewall software running on Rhino workstations.

How can I tell if a port is busy?

You can use «netstat» to check whether a port is available or not. Use the netstat -anp | find «port number» command to find whether a port is occupied by an another process or not. If it is occupied by an another process, it will show the process id of that process.

What is port 443 commonly used for?

Port 443 is a virtual port that computers use to divert network traffic. Billions of people across the globe use it every single day. Any web search you make, your computer connects with a server that hosts that information and fetches it for you. This connection is made via a port – either HTTPS or HTTP port.

Can you ping a port?

The easiest way to ping a specific port is to use the telnet command followed by the IP address and the port that you want to ping. You can also specify a domain name instead of an IP address followed by the specific port to be pinged.

There are several ways to check busy ports. It is simply necessary to periodically check ports for security purposes, since, while working on the Internet, there is a possibility that viruses or other malicious software will be transmitted to you through an open port.

How to view busy ports

How to view busy ports

Instructions

Step 1

The most important point of this problematics is the protection of your computer. So that from the very beginning it was not possible for various viruses to penetrate the operating system, you need to have a good protection system. It is important to consider that protection must be effective. Frequently, free antiviruses or small firewalls cannot cope with this task. Therefore, it is advisable to install an antivirus like Kaspersky Internet Security on your computer, and Outpost Firewall is quite effective from firewalls.

Step 2

The easiest way to check for open and, accordingly, potentially dangerous ports is to do an online test using the website https://2ip.ru (by link https://2ip.ru/port-scaner). It is possible that the analysis will identify potentially dangerous ports that should be closed. After completing the test, write down the ports marked in red separately, since they are the ones that need to be closed. If there are no ports written in red, then open ports do not threaten your system

Step 3

To get rid of open and potentially dangerous ports right away (as a temporary solution), you can use a small utility Windows Worms Doors Cleaner that does not require installation (follow the link https://2ip.ru/download/wwdc.exe). When you open the application, you need to close the ports that are marked in red in the test. Then restart your computer

Step 4

Further preventive maintenance of the operating system is necessary because the system had an open port, possibly used by malware. The most dangerous function of the system that such applications activate is the so-called. «Anonymous user». It is best to disable it using a small utility AVZ (https://z-oleg.com/secur/avz/download.php).

  • Windows check disk on boot
  • Windows cmd show all files
  • Windows cmd delete all files in folder
  • Windows cmd show all disks
  • Windows cannot verify the digital signature for this file a recent hardware