You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何关闭npm localtunnel本地隧道暴露的端口?

关闭localtunnel公网暴露端口的方法(无可见Node进程时)

步骤1:定位占用目标端口的进程ID(PID)

根据操作系统选择对应命令:

  • Linux/macOS:
    • 方法1:lsof -i :8080(输出内容中的PID列即为占用8080端口的进程号)
    • 方法2:netstat -tulpn | grep :8080
  • Windows:
    • netstat -ano | findstr :8080(输出结果最后一列的数字就是进程PID)

步骤2:强制终止目标进程

将命令中的<PID>替换为上一步查到的进程号:

  • Linux/macOS:kill -9 <PID>
  • Windows:taskkill /F /PID <PID>

执行完成后,原localtunnel的公网URL会失效,端口暴露状态即可关闭。


内容的提问来源于stack exchange,提问作者naveen_webie

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.05 18:05:32