mac 使用命令杀掉 node 服务

2021-07-09

2024-02-20 23:24更新

查看端口号的进程

// 查询5000端口PID
lsof -i:5000

界面显示

COMMAND  PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
node    1842 123   30u  IPv6 ***      0t0  TCP *:commplex-main (LISTEN)

此时 PID 是1842

杀掉进程

kill -9 1842

Profile picture

Written by Vance who lives and works in Shenzhen, China, and is working hard to improve.