Skip to content

Instantly share code, notes, and snippets.

@ayuLiao
Last active May 19, 2020 02:35
Show Gist options
  • Save ayuLiao/469c8a02420b27288c813fdea9319276 to your computer and use it in GitHub Desktop.
Save ayuLiao/469c8a02420b27288c813fdea9319276 to your computer and use it in GitHub Desktop.
查看Mac下占用端口的进程,然后关闭它
1.查看占用的端口
终端输入:lsof -i tcp:port
将port换成被占用的端口(如:8086、9998)
将会出现占用端口的进程信息
或者使用: lsof -i :5000 (看对应的端口号则可)
2.根据pid kill掉进程
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment