D01 Win10 WSL Ubuntu16 安裝和配置

TOC


1. 啓用wsl並安裝ubuntu 16.04

1. 安裝ubuntu 16.04

  1. win10 設置 -- 更新和安全 -- 開發者選項 -- 開發人員模式
  2. 控制面板 -- 程序 -- 啓用或者關閉windows功能 -- 適用於Linux的Windows子系統
  3. Microsoft Store -- Ubuntu 16.04 , 不要安裝18.04 安裝出現問題,安裝ubuntu ,設置用戶名密碼
    或者經過這個連接喚醒進入store,安裝ubuntu16 https://www.microsoft.com/zh-cn/p/ubuntu-1604-lts/9pjn388hp8c9?activetab=pivot%3Aoverviewtab
  4. cmd -- bash -- 進入ubuntu

1.2 ubuntu16 開啓sshd服務SecureCRT 訪問

開啓sshd服務,SecureCRT 或者 Xshell 直接訪問shell

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.listubuntu

#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 updatevim

相關文章
相關標籤/搜索