Check port occupancy on mac and forcefully delete occupied ports

1. Command lsof -i tcp:port (replace port with port number, such as redis port 6379) to check what program is occupying the port and display the PID, which is convenient for KILL

Insert image description here
2. Use kill -9 pid to delete the port occupation
Insert image description here

Guess you like

Origin blog.csdn.net/qq_38847655/article/details/120992782