Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use Linux Subsystem in Win10

Shulou Source: shulou.com Published: 2022-06-01 23:54:16 10月27日 Update

This article mainly introduces "how to use the Linux subsystem in Win10". In the daily operation, I believe that many people have doubts about how to use the Linux subsystem in Win10. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "how to use the Linux subsystem in Win10". Next, please follow the editor to study!

Enable developer mode

Open Settings

Click Update and Security

Click the developer option and select developer mode

Change system function

Use the Win+X shortcut to bring up the system management menu, click Apps and functions, then pull to the bottom, and select programs and functions

Click to enable or disable the Windows feature

Check the Windows subsystem for Linux, then confirm and restart the Windows system

Install the Linux subsystem

After restarting the Windows system, the Linux subsystem has not been installed yet. You need to install it through Microsoft Store.

Search WSL

Select Ubuntu 18.04 LTS

Click to get

Click install

Win10-enabled Linux subsystem enables Win10's Linux subsystem

Downloading Ubuntu 18.04 LTS

Click start

Create a new user and set the user password, and execute sudo-s to switch to the root user

Change source, update source

Cp / etc/apt/sources.list / etc/apt/sources.list.bakvim / etc/apt/sources.listdeb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiversedeb -src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverseapt-get update

Install test software

Linux old driver drives the train.

Set environment variabl

Quickly log in to the Linux subsystem

WIN + R bash

Configure SSH

SSH connects the Win10 Linux subsystem

Check whether the SSH service is enabled

Ps-ef | grep ssh

Install the SSH service

Apt-get remove openssh-serverapt-get install openssh-server

Change the configuration port to 22 and enable password login.

Vim / etc/ssh/sshd_configPort 22PasswordAuthentication yes

Restart the service

Service ssh restart or service ssh-- full-restart

Connect the Win10 Linux subsystem through SecureCRT

Enter sudo-s to switch to the root user

Lift the restriction that Ubuntu prohibits root remote login

Add PermitRootLogin yesroot@T62YP5MBBDL7ZEB:~# vim / etc/ssh/sshd_config26 # Authentication:27 LoginGraceTime 12028 # PermitRootLogin without-password29 PermitRootLogin yesroot@T62YP5MBBDL7ZEB:~# service ssh restart to the / etc/ssh/sshd_config configuration file

Log in to the Win10 Linux subsystem with root through SecureCRT

At this point, the study on "how to use the Linux subsystem in Win10" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Subsystem function user system learning login development service selection configuration password developer more mode switch help update utility security next Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft Shulou Information Linux macOS