Ubuntu系统如何解决端口被占用的问题

2024-10-14 14:38:20

1、登录Ubuntu系统,运行一个Python网络程序,端口被占用报错如下图所示

Ubuntu系统如何解决端口被占用的问题

3、按照Ubuntu系统提示,安装网络工具,命令如下:sudo apt install net-tools

Ubuntu系统如何解决端口被占用的问题

5、在上一步看到进程号为20349,强制终止这个进程,使用命令kill -9 20349

Ubuntu系统如何解决端口被占用的问题
猜你喜欢