Home  >  Article  >  Backend Development  >  Ubuntu displays port occupancy, running programs, and forcefully closes a process

Ubuntu displays port occupancy, running programs, and forcefully closes a process

伊谢尔伦
伊谢尔伦Original
2016-11-28 09:47:011652browse

ubuntu, display port occupation, display running programs, and force close a process

1. Display the program occupying a certain port

lsof -i:80
lsof -i:5000

2. Display whether a certain program is running, view a running program

ps -aux | grep "paster"
ps -aux | grep apache2

3. Kill a process and force kill a process

kill 211119
sudo kill -s 9 21119


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