|
Ubuntu Check port usage, use the netstat command:
View Service port is already connected (ESTABLISHED)
netstat -a
See all service ports (LISTEN, ESTABLISHED)
netstat -ap
Check the specified port, you can combine grep command:
netstat -ap | grep 8080
You can also use the lsof command:
lsof -i: 8888
To turn off the use of this port, the use of the corresponding pid kill +
kill -9 PID number
ps: kill a process id is to send a signal. The default signal sent is SIGTERM, the signal sent by kill -9 is SIGKILL, namely exit. exit signal is not blocked by the system, so kill -9 can successfully kill the process. |
|
|
|