控制面板里面应用模块找到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文件, 在文件最前面添加以下条目(操作前请做好相应备份):ubuntu 18.04(bionic) 配置如下
deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports 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镜像