Linux closes the specified port number (the port number is occupied)

Query the specified port number

netstat -apn | grep 端口号

Close specified port

fuser -k -n tcp 端口号

Example

Check port 19010, as shown below, 30799 is the process

Please add image description

Close port 19010, query again, and the process is shut down.

Please add image description

Guess you like

Origin blog.csdn.net/xiaohuihui1400/article/details/133030396