Home  >  Article  >  Operation and Maintenance  >  Check the port usage on mac and end the process

Check the port usage on mac and end the process

王林
王林forward
2020-05-11 17:15:205794browse

Check the port usage on mac and end the process

Check port occupancy command

sudo lsof -i :9000

After the colon is the port number you need to check.

Check the port usage on mac and end the process

End the process occupying the current port number

There is a column named PID in the header. This column indicates that the current port number is occupied. Port process.

sudo kill -9 27374

The above is the detailed content of Check the port usage on mac and end the process. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:cnblogs.com. If there is any infringement, please contact admin@php.cn delete
Previous article:What does Mac OS mean?Next article:What does Mac OS mean?