[linux]mac解除某个端口的占用

来源:互联网 发布:centos 移除文件夹 编辑:程序博客网 时间:2024/05/21 14:47

mac解除某个端口的占用

sudo lsof -i -P | grep -i "8080"

java      27438            mac   61u  IPv6 0xcce10932bd16b155      0t0   TCP *:8080 (LISTEN)

java      27438            mac  293u  IPv6 0xcce10932bd6f6655      0t0   TCP localhost:8080->localhost:49247 (CLOSE_WAIT)

java      27438            mac  294u  IPv6 0xcce10932bd296455      0t0   TCP localhost:8080->localhost:50618 (CLOSE_WAIT)

java      27438            mac  295u  IPv6 0xcce10932bd295a55      0t0   TCP localhost:8080->localhost:52316 (CLOSE_WAIT)

java      27438            mac  296u  IPv6 0xcce10932bd295555      0t0   TCP localhost:8080->localhost:52317 (CLOSE_WAIT)

java      27438            mac  297u  IPv6 0xcce10932bd16ac55      0t0   TCP localhost:8080->localhost:52608 (CLOSE_WAIT)

java      27438            mac  298u  IPv6 0xcce10932bd295f55      0t0   TCP localhost:8080->localhost:54613 (CLOSE_WAIT)

java      27438            mac  299u  IPv6 0xcce10932bd295055      0t0   TCP localhost:8080->localhost:57040 (CLOSE_WAIT)

java      27438            mac  300u  IPv6 0xcce10932bcfe4655      0t0   TCP localhost:8080->localhost:57041 (CLOSE_WAIT)

macdeMBP:~ mac$ sudo kill -9 27438