控制面板里面应用模块找到Ubuntu,可以卸载或者移动到其他盘。
Microsoft 应用程序 - ubuntu
https://apps.microsoft.com/store/search/ubuntu?hl=zh-cn&gl=cn&rtc=1
选择想要的版本安装。
cp /etc/apt/sources.list /etc/apt/sources.list.bak
nano /etc/apt/sources.list
编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
然后执行命令:
sudo apt-get update
sudo apt-get upgrade
在命令提示符中运行
apt install python3-pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
WIN+X,管理员模式打开Powershell,输入如下命令:
C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu18.04LTS_1804.6.4.0_x64__79rhkp1fndgsc> .\ubuntu1804.exe config --default-user root
阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区
https://developer.aliyun.com/mirror/?spm=a2c6h.265751.1364563.38.728e2621iHKW48
选择OS镜像