Run the netstat command to view port usage in Ubuntu: view the connected service port (ESTABLISHED) netstat-a to view all service ports (LISTEN, ESTABLISHED) netstat-ap to view the specified port, you can use the grep command: netstat-ap | grep8080 or lsof command: lsof-I: 8888.
Run the netstat command to view port usage in Ubuntu:
View the connected service port (ESTABLISHED)
Netstat-
View All service ports (LISTEN, ESTABLISHED)
Netstat-ap
To view the specified port, run the grep command:
Netstat-ap | grep 8080
You can also use the lsof command:
Lsof-I: 8888
To disable the program that uses this port, use kill + corresponding pid.
Kill-9 PID no.
Ps: kill sends a signal to a process id. The signal sent by default is SIGTERM, while the signal sent by kill-9 is SIGKILL, that is, exit. The exit signal is not blocked by the system, so kill-9 can successfully kill the process.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2016-01/127345.htm