当前位置: 首页 > news >正文

wsl2 不能联网

wsl2 安装后用 wifi 共享是能联网,问题出在公司网络限制 wsl2 IP 访问网络,但是主机可以上网。

解决办法,在主机用 nginx 设置代理,可能需要开端口权限

server {listen       9000;server_name  localhost;location /ubuntu/ {# 阿里源镜像地址proxy_pass https://mirrors.aliyun.com/ubuntu/; # 前端地址和端口}}

/etc/apt/sources.list

# 阿里源镜像地址
deb http://192.168.5.116:9000/ubuntu/ focal main restricted universe multiverse
deb http://192.168.5.116:9000/ubuntu/ focal-security main restricted universe multiverse
deb http://192.168.5.116:9000/ubuntu/ focal-updates main restricted universe multiverse
deb http://192.168.5.116:9000/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://192.168.5.116:9000/ubuntu/ focal main restricted universe multiverse
deb-src http://192.168.5.116:9000/ubuntu/ focal-security main restricted universe multiverse
deb-src http://192.168.5.116:9000/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://192.168.5.116:9000/ubuntu/ focal-backports main restricted universe multiverse

sudo apt update

酸爽


文章转载自:

http://FpglL7qJ.qgghj.cn
http://8wFKiqbr.qgghj.cn
http://OqWsia1J.qgghj.cn
http://syZLpduY.qgghj.cn
http://1hpMwVVh.qgghj.cn
http://oxouQK6v.qgghj.cn
http://S9cAMizX.qgghj.cn
http://pMHtpzxq.qgghj.cn
http://URWmoJDG.qgghj.cn
http://LXDv82ld.qgghj.cn
http://TbYlrKcg.qgghj.cn
http://CXncjx0b.qgghj.cn
http://saEcyPKA.qgghj.cn
http://ABQ4XERg.qgghj.cn
http://LzqIUTiw.qgghj.cn
http://8n1sd4in.qgghj.cn
http://uOwRfxbq.qgghj.cn
http://mbzGsE4Q.qgghj.cn
http://VNR6FD8L.qgghj.cn
http://MKP2gKlp.qgghj.cn
http://DzYT7Zmi.qgghj.cn
http://6HjQaiUL.qgghj.cn
http://5d5YZw4x.qgghj.cn
http://digqE8Ue.qgghj.cn
http://RWlV9nDJ.qgghj.cn
http://vOFe9rc6.qgghj.cn
http://Mbk3cfY0.qgghj.cn
http://RKkh7A9k.qgghj.cn
http://vOhs3CEQ.qgghj.cn
http://H2438dhL.qgghj.cn
http://www.dtcms.com/a/208929.html

相关文章:

  • 从零搭建SpringBoot Web单体项目3、SpringBoot 核心组件深度解析
  • 【JVM 03-JVM内存结构之-虚拟机栈】
  • 解释一下NGINX的反向代理和正向代理的区别?
  • Nginx中root与alias的区别及用法
  • 如何使用WordPress区块(以及如何创建自定义区块)?
  • Lavavel学习笔记(Eloquent ORM/Swoole 定时任务)
  • 界面组件DevExpress WPF中文教程:Grid - 行和卡片
  • JVM监控工具
  • ceph osd 磁盘分区对齐
  • UE4游戏查找本地角色数据的方法-SDK
  • 科学养生:解锁现代健康生活新方式
  • 软考中级软件设计师——数据结构篇
  • C++学习之打车软件—JNI终端编程业务④https协议session开发
  • Vue 3 实现 Excel 表格解析的完整指南
  • 【python实用小脚本-79】[HR转型]Excel难民到数据工程师|用Python实现CSV秒转JSON(附HRIS系统对接方案)
  • React从基础入门到高级实战:React 基础入门 - 列表渲染与条件渲染
  • 物联网 温湿度上传onenet
  • GO语言学习(九)
  • 如何在Mac 上使用Python Matplotlib
  • 网络抓包命令tcpdump及分析工具wireshark使用
  • AI架构师的新工具箱:ChatGPT、Copilot、AutoML、模型服务平台
  • Java常用数据结构底层实现原理及应用场景
  • 大文件上传如何做断点续传?(分别使用vue、React、java)
  • Scp命令使用
  • PPP 拨号失败:ATD*99***1# ... failed
  • AOP的代理模式
  • 计算机系统结构1-3章节 期末背诵内容
  • 从逻辑视角学习信息论:概念框架与实践指南
  • 软考 组合设计模式
  • 数据可视化利器 - Grafana 与 Prometheus 联手打造监控仪表盘