The Linux command to check the occupancy of a certain port is: lsof -i: port number
So how does Windows see it? The steps are as follows
. Take port 8090 as an example:
1. Start --> Run --> cmd, or press the window+R key combination to enter cmd to bring up the command window
2. View the process occupying the port
Execute the command Netstat -aon|findstr "8090"
Note down the last digit, the process id or PID is 16028.
3. View the process information corresponding to the pid
Execute the command tasklist|findstr "16028"
and press Enter to check which program occupies port 8090, the result is: java.exe
4. End the process
Enter in the command window of cmd:
taskkill /f /t /im java.exe
The process can be killed, and the command is successfully executed as follows:
.
From my blog post: http://www.iotjike.com/article/32