-i 查看某个端口是否被占用,如
lsof -i:8081 显示占用情况 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 12188 aya 192u IPv6 0x6bfda869e0b2dab1 0t0 TCP *:sunproxyadmin (LISTEN)
关闭PID
kill 12188
-i 查看某个端口是否被占用,如
lsof -i:8081 显示占用情况 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 12188 aya 192u IPv6 0x6bfda869e0b2dab1 0t0 TCP *:sunproxyadmin (LISTEN)
关闭PID
kill 12188