开权限
控制面板 --- 程序 --- 启用或关闭 Windows 功能 --- 适用于 Linux 的 Windows 子系统
Microsoft store 下载Ubuntu
打开Ubuntu
根据提示设置账号密码
可能要等一会,直到黑框框跳出提示信息
设置密码时,密码不会显示
换源
# 对系统给的镜像源进行备份,以防出问题 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup # 删除镜像源文件 sudo rm /etc/apt/sources.list # 重新建立镜像源文件并编辑 sudo nano /etc/apt/sources.list # 复制某种镜像源到 sources.list 中,ctrl + X 保存并退出
中科大源
# 默认注释了源码仓库,如有需要可自行取消注释 deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
更新和下载
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get install gdb