Step 1:
Open up cmd.exe (note: you may need to run it as an administrator, but this isn’t always necessary), then run the below command:
netstat -ano | findstr :<PORT>
(Replace <PORT>
with the port number you want, but keep the colon)
The area circled in red shows the PID (process identifier). Locate the PID of the process that’s using the port you want.
Step 2:
Next, run the following command:
taskkill /PID <PID> /F
(No colon this time)
Lastly, you can check whether the operation succeeded or not by re-running the command in “Step 1”. If it was successful you shouldn’t see any more search results for that port number.
Related Posts:
- How do I test if Python is installed on Windows (10), and run an exe to install it if its not installed?
- Windows equivalent to UNIX pwd
- Command line for looking at specific port
- “rm -rf” equivalent for Windows?
- “rm -rf” equivalent for Windows?
- What is the reason for the CD /D switch in Windows cmd?
- Windows 7 – ‘make’ is not recognized as an internal or external command, operable program or batch file
- Ping with timestamp on Windows CLI
- What is the Windows equivalent of the diff command?
- Command prompt won’t change directory to another drive
- Changing all files’ extensions in a folder with one command on Windows
- What is the reason for the error message “System cannot find the path specified”?
- How to run powershell script from .ps1 file?
- ‘git’ is not recognized as an internal or external command
- How to list files in windows using command prompt (cmd). I’ve tried using ‘ ls ‘ as in Linux but it shows an error?
- ‘git’ is not recognized as an internal or external command
- ” is not recognized as an internal or external command, operable program or batch file
- How can you find out which process is listening on a TCP or UDP port on Windows?
- How can I open a cmd window in a specific location?
- Create an empty file on the commandline in windows (like the linux touch command)
- Need to navigate to a folder in command prompt
- How do I create a Batch file to change an exe installer to Win XP SP3 compatibility mode and launch installer
- ” is not recognized as an internal or external command, operable program or batch file
- Access is denied in windows cmd.Why?
- How to “comment-out” (add comment) in a batch/cmd?
- The filename, directory name, or volume label syntax is incorrect inside batch
- stop all instances of node.js server
- javac not working in windows command prompt
- Moving file using cmd?
- How to force `findstr` to ignore `Cannot open` returns
- #1045 – Access denied for user ‘root’@’localhost’ (using password: YES)
- How to “comment-out” (add comment) in a batch/cmd?
- python is not recognized windows 10
- “if not exist” command in batch file
- “if not exist” command in batch file
- Defining and using a variable in batch file
- How to run PowerShell in CMD
- How to open an elevated cmd using command line for Windows?
- xcopy returns error “Invalid number of parameters” when exclude parameter is set
- PHP is not recognized as an internal or external command in command prompt
- ‘openssl’ is not recognized as internal or external command
- XCOPY: Overwrite all without prompt in BATCH
- How to grant permission to users for a directory using command line in Windows?
- Curl not recognized as an internal or external command, operable program or batch file
- Redirecting Output from within Batch file
- How does the echo command works in batch programming
- How to split large text file in windows?
- Windows CMD command for accessing usb?
- Aliases in Windows command prompt
- How do I use spaces in the Command Prompt?
- Calling dir in cmd prints out: “Volume in drive C has no label.”
- How to extract or unpack an .ab file (Android Backup file)
- Desktop: The system cannot find the specified path
- WordPress fails to install with “Can’t Select Database” Error (WAMPServer)
- Custom permalink gives 404 error only in some pages
- Search and Replace in Windows XAMPP site
- Saving Permalinks Results in 403 MAMP (Windows)
- Failed to upload image on localhost
- What port should I open to allow remote desktop?
- How to check if a port is blocked on a Windows machine?
- How do you free up a port being held open by dead process?
- “X does not name a type” error in C++
- How to exit Python script in Command Prompt?
- Verify return code: 20 when testing OpenSSL
- What is the difference between ports 465 and 587?
- Compare 2 directories in windows
- Can’t start hostednetwork
- Taskkill /f doesn’t kill a process
- Java and Windows – error: illegal escape character
- Failed to load the JNI shared Library (JDK)
- MongoError: failed to connect to server [localhost:27017] on first connect
- Run Command Line & Command From VBS
- REGSVR32: the module “xxxxx.dll” failed to load … dependent assembly could not be found
- Can I get Unix’s pthread.h to compile in Windows?
- How to set up wordpress domain mapping on MAMP Pro
- Loading media on local WordPress using remote database
- local wordpress blog issues
- WordPress custom permalinks not working on OS X localhost
- WordPress asking for login on public pages on localhost
- Locally Developing a wordpress website, cant get images to display?
- Redirect to localhost after installing Multisite on server
- Setting up a local copy from a production site
- Problem migrating to localhost
- $_SESSION variable not saving on page refresh or new page
- Can’t Connect to MySQL Database using WP CLI and MAMP on a macOS Catalina, using Oh My Zsh
- All includes are pointing at local host
- Design problems when exporting remote database for local development
- I want to edit it on my laptop as a child theme and transfer the files to my server. I don’t know how
- Newbie: Multiple WP sites on Windwos 2012 IIS
- Recovery – Restore Database after moving folder location locally
- Install WordPress – Localhost
- My home page is still showing link “localhost” [duplicate]
- Migrating a live WordPress website to a Local Server: why some elements of the website are missing?
- How to update WP-CLI on Windows via Composer?
- Upload media error: unable to create directory (windows hosting)
- Running a Development Copy of WordPress?
- How to view front-end of WordPress website, using Atom?
- How can I tell what version of IIS is installed?
- What is the maximum port number?
- WordPress Localhost migration issue