Skip to content

Goldu/How-to-rest-the-TCP-Port-in-Windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 

Repository files navigation

How-to-rest-the-TCP-Port-in-Windows

To reset a TCP port that is listening on 0.0.0.0:2000, you can follow these general steps

Identify the process associated with the port: Open the command prompt or terminal on your system and run the following command:

netstat -ano 

image

if you don't find the PID id of your port no, you can use this command to find the PID. This will display the process ID (PID) of the program using the port.

netstat -ano | findstr :port_no

Example

   netstat -ano | findstr :2000

image

Terminate the process:

Use the PID obtained from the previous step to stop the program or process using the port. In the command prompt or terminal, execute the following command:

   taskkill /PID <PID> /F
Replace <PID> with the actual process ID you obtained.

Example:

   TASKKILL /PID 23340 /F

Verify that the port is no longer in use:

Run the netstat command again to ensure that the port is no longer listed. Use the command:

   netstat -ano | findstr :2000

If the port is no longer in use, there should be no output. image

Note: At this point, the port should be reset and available for use.

If you're intending to use the port for a specific program or service, make sure to restart that program after resetting the port.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published