Current location - Quotes Website - Team slogan - How does MAC check the port occupancy?
How does MAC check the port occupancy?
The landlord can open the mac terminal, or the terminal of idea, and input:

Lsof -i: port number (my port number is 8020, so I enter the following command)

lsof -i:8020

After entering, you can see that the process id corresponding to the port is xxx, for example, mine is 1472, so the process of kill can. Enter the following command directly.

Kill 1472

Reference: mac failed to start springboot, port 8080 was occupied, and the mac command line closed port/blog/web/201805251638.