1. 启用wsl并安装ubuntu 16.04
1. 安装ubuntu 16.04
- win10 设置 -- 更新和安全 -- 开发者选项 -- 开发人员模式
- 控制面板 -- 程序 -- 启用或者关闭windows功能 -- 适用于Linux的Windows子系统
- Microsoft Store -- Ubuntu 16.04 , 不要安装18.04 安装出现问题,安装ubuntu ,设置用户名密码
或者通过这个链接唤醒进入store,安装ubuntu16 https://www.microsoft.com/zh-cn/p/ubuntu-1604-lts/9pjn388hp8c9?activetab=pivot%3Aoverviewtab - cmd -- bash -- 进入ubuntu
1.2 ubuntu16 开启sshd服务SecureCRT 访问
开启sshd服务,SecureCRT 或者 Xshell 直接访问
sudo su -
apt-get install openssh-server
service ssh start
vim /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes
#PasswordAuthentication no
PasswordAuthentication yes
service ssh stop && service ssh start
2. Ubuntu apt换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list
#deb包
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
sudo apt-get update