Find (and kill) process locking port 9000 on Mac

  1. You can try netstat

    netstat -vanp tcp | grep 9000
    
  2. For macOS El Capitan and newer (or if your netstat doesn't support -p), use lsof

    lsof -i tcp:9000
    sudo lsof -i :9000
    
  3. Kill:

    kill -9 <PID>
    

PLEASE NOTE: -9 kills the process immediately, and gives it no chance of cleaning up after itself. This may cause problems. Consider using -15 (TERM) or -3 (QUIT) for a softer termination which allows the process to clean up after itself.

posted @   RioTian  阅读(302)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· 分享4款.NET开源、免费、实用的商城系统
· 解决跨域问题的这6种方案,真香!
· 一套基于 Material Design 规范实现的 Blazor 和 Razor 通用组件库
· 5. Nginx 负载均衡配置案例(附有详细截图说明++)
历史上的今天:
2020-04-02 LeetCode | 136. 只出现一次的数字Ⅰ Ⅱ
2020-04-02 原地算法(in-place algorithm)
2020-04-02 LeetCode | 289. 生命游戏(原地算法/位运算)
点击右上角即可分享
微信分享提示