Enable WSL Make sure the system is Windows 10 2004 or later Right-click "Menu" - "Settings" - "Apps" - "Programs and Features" - "Turn Windows features on or off" Select "Windows Subsystem for Linux" Restart system application settings Install WSL2 Ubuntu 20.04 Enable WSL2 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --set-default-version 2 Open "Microsoft Store", search for Ubuntu 20.04, and click Install After the download is complete, launch Ubuntu 20.04 LTS from the start menu Update the software sources and update sudo tee /etc/apt/sources.list << EOF deb http://mirrors.163.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ $(lsb_release -cs)-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ $(lsb_release -cs)-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ $(lsb_release -cs) main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ $(lsb_release -cs)-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ $(lsb_release -cs)-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-proposed $(lsb_release -cs) restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-backports $(lsb_release -cs) restricted universe multiverse EOF sudo apt-get update sudo apt-get upgrade -y Install Docker sudo apt-get install -y apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu bionic stable" # Currently there is no domestic Tsinghua docker source for 20.04, so temporarily use the 18.04 version sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io sudo cp /mnt/c/Windows/Fonts /usr/share/fonts/chinese -r cd /usr/share/fonts/chinese sudo mkfontscale sudo mkfontdir fc-cache -fv source /etc/profile sudo chmod -R 755 * Install zsh sudo apt-get install zsh sh -c "$(wget -O- https://gitee.com/kingscat/ohmyzsh/raw/master/tools/install.sh)" This is the end of this article about how to install WSL2 Ubuntu20.04 on Windows 10 and set up a docker environment. For more information about installing WSL2 Ubuntu20 on Windows 10, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Vue implements zip file download
>>: Summary of various common join table query examples in MySQL
There are two types: (different browsers) 1. Avail...
Unzip the file into a directory This is the direc...
The transaction log records the operations on the...
Table of contents 1. Overview of the page 2. Infi...
A vector wave <svg viewBox="0 0 560 20&qu...
I haven't worked with servers for a while. No...
This article example shares the specific code of ...
The floating-point types supported in MySQL are F...
The web color picker function in this example use...
Tip 1: Stay focused The best mobile apps focus on...
If you directly set the width attribute to the sty...
A web server can build multiple web sites with in...
Jenkins is an open source software project. It is...
Table of contents 1. this keyword 2. Custom attri...
The installation process is omitted (I installed ...