win10 wsl ubuntu 更换版本为18.04 apt换国内源Python换国内源;默认root

控制面板里面应用模块找到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

你可能感兴趣的:(angr,ubuntu,python,linux)