0.前言&参考
为什么要使用win11系统?因为可以直接在Windows 子系统上运行 Linux GUI 应用。
本文为本人在win11下使用wsl2配置ubuntu20.04 + ROS的过程,期间碰到了一些问题,汇总记录成本篇博客。
参考文章:
Win10下使用WSL2安装ROS1并使用独显的方法
Ubuntu 20.04更换下载源详细教程
win11 安装Ubuntu加可视化桌面(最新保姆级教程)
1.开启子系统
打开控制面板-所有控制面板项-程序和功能-启用或关闭Windows功能
勾选
2.安装Ubuntu20.04
直接在Microsoft Store搜索并下载Ubuntu20.04即可。
第一次启动时输入用户名,注意首字母不要大写。
然后输入两次密码即可,注意输入的时候密码不显示。
安装完成。
3.换源
我们需要换成国内源,例如阿里源、清华源、华为源、中科大源等。
目前推荐的是阿里源和华为源,其中实测华为源速度最高,下面以阿里源为例:
首先编辑镜像源文件:
sudo vim /etc/apt/sources.list
按I开始编辑,将其中的内容更换为
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restri