Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Linux Subsystem in Win10

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report