Win10 installation using Ubuntu 18.04 (WSL version)

Time:2020-10-25

WSL (Windows subsystem for Linux) is a Linux subsystem under windows.

1. Installation environment: win10

2. Using tools: Microsoft Store

3. Operation steps

3.1 Microsoft Store download Ubuntu 18.04

Step 1: search for Ubuntu

Step 2: Click

Step 3: click Install and wait for download

3.2 activate WSL

Run the power shell as an administrator and run the following statement.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

3.3 create users

Click the start menu (Windows key), find and open Ubuntu 18.04, wait for installation, and enter your user name and password.

3.4 replace aliyuan

Use domestic aliyuan, download and update software will be faster!

3.4.1 backup the original file

Sudo (super backup) command, i.e. input the backup command to perform the backup operation.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
3.4.2 modify file and add image source

Use sudo to modify the contents of the file. The command is as follows:

sudo vim /etc/apt/sources.list

After running the above command, enter the following interface, that is, open it with an editor (similar to Notepad) sources.list Content of.

 

 

       The following operation is very important!!!

① Click on the keyboardionce. Indicates that you are in edit mode.

② Move the cursor to the end of the file content and press enter. Indicates input on the next line.

③ Copy the content below, click to activate the WSL window and paste it in. Paste method: click the right mouse button.

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

④ Click on the keyboardEscOnce, enter:wq, enter.

 

3.5 update software source

Enter the following commands in sequence.

sudo apt update
sudo apt upgrade

 

 

Wait for the running to finish~~~

 

reference material:

【1】 Activate WSL

【2】 Ubuntu replace aliyuan