baicai

白菜

一个勤奋的代码搬运工!

Mac 常用命令

查看指定端口的进程#

sudo lsof -i :5353

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mDNSRespo 185 _mdnsresponder 6u IPv4 0x1111111111111 0t0 UDP *
mDNSRespo 185 _mdnsresponder 7u IPv6 0x1111111111111 0t0 UDP *

根据进程名称#

ps -ef | grep mDNSRespo

65 185 1 0 8:08 上午??0:26.69 /usr/sbin/mDNSResponder
0 223 1 0 8:08 上午??0:02.16 /usr/sbin/mDNSResponderHelper
501 66848 66623 0 11:00 下午 ttys000 0:00.00 grep mDNSRespo

根据 PID 杀进程:#

sudo kill -9 185

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.