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
Table of contents 1. Basic Examples 2. Computed p...
Form submission code 1. Source code analysis <...
Table of contents 1: Front-end handwritten paging...
Recently, I have been working on a large-screen d...
When designing table structures, numeric types ar...
Using the html-webpack-plugin plug-in to start th...
Table of contents 1. Middleman Model 2. Examples ...
Basic introduction to robots.txt Robots.txt is a p...
Preface In daily development, when we use MySQL t...
one. First of all, you have to package it in idea...
The ECS cloud server created by the historical Li...
Table of contents Preface 1. Overview 2. Read-wri...
1. Create an empty directory $ cd /home/xm6f/dev ...
What is MIME TYPE? 1. First, we need to understand...
This article example shares the specific code of ...