2

解决Windows端口莫名其妙被WSL2占用的问题

 1 year ago
source link: https://www.liesauer.net/blog/post/724.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

解决Windows端口莫名其妙被WSL2占用的问题

查看端口占用

  1. netstat -ano | findstr "端口号"

并没有发现端口被占用,怀疑是被系统占用,且这种情况是升级WSL2后才出现的,一顿搜索发现是WSL2使用了Hyper-V导致的。

修改动态端口范围

管理员模式运行

  1. netsh int ip set dynamicport tcp start=49152 num=16384

重启即可。

标签: wsl, wsl2, netstat, 端口占用

添加新评论

称呼

Email

当有人回复时接收邮件提醒

网站

内容


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK