Use Linux subsystem under windows - install .net core environment

In the Windows web development and more common solution is to use phpstudy or some other integrated environment software environment to build, will write the code to upload the code version management tools git / svn, and then synchronize the code to the Linux server, this process among the developer's development environment (Windows) and final environmental Code (Linux) is inconsistent execution often cause some weird problems, like web development under linux on Windows, I do not want to use mac (after all, no money to buy mac) and do not want to use a virtual machine (VM slow boot, add the site to restart, allocate memory cause the machine to become Caton), this time, it appears wsl the perfect solution to these problems. Without having to experience the Linux virtual machine as well as in the form of a dual system, and can achieve system-level file interaction, it is too attractive a.


 

What is wsl

In Windows 10 system built into Linux, Linux subsystem runs on Windows 10, Microsoft will be named the Linux system: Windows Subsystem for Linux. Referred to WSL.

 

Start Linux subsystem

  System Requirements: Windows 10 and must be 64-bit. In the "Control Panel" -> "Programs and Features" -> "Enable Windows features on and off" in check "for Linux Windows subsystem," to determine the reboot. After the restart, the Microsoft Store search Linux, among the search results based on the current server is typically used in Debian 10.0 version (free).

  Need to restart the computer after installing Debian, restart the computer after the Debian system can be found in the Start menu, first open the initial installation will be carried out, usually lasts a few minutes, then Linux will be prompted to set up a user name and password, follow the prompts to operate.

Carried out step by step installation .net core environment after the system is running:

first step:

Install wget, it is a free tool to automatically download files from the network, supported by HTTP, HTTPS, FTP the three most common  TCP / IP protocol  to download, and can use the HTTP proxy. "wget" The name comes from the combination of "World Wide Web" and "get" the. 

sudo apt-get install -y wget gpg

.net core environmental installation: https: //docs.microsoft.com/zh-cn/dotnet/core/install/linux-package-manager-debian10

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/10/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-3.1
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install aspnetcore-runtime-3.1
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-runtime-3.1

 

Guess you like

Origin www.cnblogs.com/intotf/p/12133007.html