Install WSL system offline

wsl   Windows Subsystem for Linux

Windows Subsystem for Linux (WSL for short) is a compatibility layer that can run native Linux binary executable files (ELF format) on Windows 10\11 . It is jointly developed by Microsoft and Canonical, and its goal is to enable pure Ubuntu, Debian and other images to be downloaded and decompressed to the user's local computer, and the tools and utilities in the image can run natively on this subsystem .
Note: Only systems above WIN10 are supported!  

1. Turn on the WSL function 

After turning it on, the computer will automatically restart! 
 

2. Set the computer WSL version to WSL1 

 

 The command is as follows:

wsl    --set-default-version  1       #这句话就是设置版本为WSL1 

3. Download and unzip    the Ubuntu.zip archive

download link: 

链接:https://pan.baidu.com/s/1NAnKc_uI8xelurs0XB3whg?pwd=2333 
提取码:2333 
--来自百度网盘超级会员V4的分享
Unzip and run: 
Run the installer file:

 Reminder: The entered password is invisible

4. Install development tools

The command is as follows:
sudo apt-get  update
sudo apt-get  install  g++
sudo apt-get  install  libfftw3-dev  libfftw3-single3
sudo apt-get  install  libopenblas-dev

5. Install the cross compiler 

Put the cross compiler into the root directory of the computer's C disk

Unzip the cross compiler 

The command is as follows

 sudo  tar  -xvf  /mnt/c/arm-linux-gnueabi-5.4.0.tar.xz  -C  /
Configure environment variables

The command is as follows

echo  'export   PATH=$PATH:/usr/local/arm/5.4.0/usr/bin'   >>   ~/.bashrc
 
source  ~/.bashrc

sudo ln -s  /usr/lib/x86_64-linux-gnu/libmpfr.so.6   /usr/lib/x86_64-linux-gnu/libmpfr.so.4

6. Install VSCODE

Double click to run 

crazy next step

 

 Open VSCODE and install the plugin

 Chinese plug-in

WSL plugin

Start WSL in VS_CODE 

open a workspace  

 

Supplement: If WSL crashes, please uninstall and reinstall

Open the CMD terminal and enter the uninstall command:

wsl  --unregister  Ubuntu-18.04

Guess you like

Origin blog.csdn.net/qq_34548424/article/details/127421370