Home  >  Article  >  Backend Development  >  ubuntu checks the programs occupying a certain port

ubuntu checks the programs occupying a certain port

伊谢尔伦
伊谢尔伦Original
2016-11-29 11:11:451697browse

To view port usage, use the netstat command.
View the connected service ports (ESTABLISHED)

netstat -a

View all service ports (LISTEN, ESTABLISHED)

netstat -ap

To view the 8080 port, you can combine it with the grep command:

netstat -ap | grep 8080

If you want to view the 8888 port, enter in the terminal:

lsof -i:8888

To stop the program using this port, use kill + the corresponding pid


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn