Linux dynamically closes the process of the specified port

The following commands can be used to kill all processes occupying a port.

root user:

kill -9 $(lsof -i tcp:port number -t)

Non-root users:

kill -9 $(sudo lsof -i tcp:port number -t)

Guess you like

Origin blog.csdn.net/ccagy/article/details/112235902