​python学习手册大全点我下载​

win10安装linux子系统(wsl)

1、打开Microsoft Store

方式一:在电脑左下角打开

win10安装linux子系统(wsl)_其它

方式二:在电脑左下角的搜索里win10安装linux子系统(wsl)_其它_02里输入Microsoft Store

打开Microsoft Store后,搜索Linux即可:

win10安装linux子系统(wsl)_其它_03

然后点击获取Linux应用:

win10安装linux子系统(wsl)_其它_04

一般选择安装ubuntu:

win10安装linux子系统(wsl)_其它_05

选择好应用后,按提示安装,一般都安装在c盘。

2、允许windows运行linux子系统

打开控制面板->程序和功能->启动或关闭windows功能

win10安装linux子系统(wsl)_其它_06

勾上“适用于Linux的Windows子系统”,点击确定,然后按提示重启电脑。

3、启动ubuntu

打开应用目录,选择ubuntu,就可以打开了,然后按提示创建一个用户

win10安装linux子系统(wsl)_其它_07

可以点击上面的白色条框右键选择属性,然后改变字体大小与颜色。

4、ubuntu安装目录

一般在c盘

1、

C:\Users\你的用户名\AppData\Local\Packages\
CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
\LocalState\rootfs\home

2、

C:\Users\ldc\AppData\Local\Packages\
CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs

5、使用xftp连接windows下的ubuntu

1.打开linux系统
2.切换到root角色
sudo -i //切换到root 并输入密码
3.卸载安装ssh server
sudo apt-get remove openssh-server //卸载
sudo apt-get install openssh-server // 重新安装
4.修改ssh server 配置
sudo vim /etc/ssh/sshd_config
修改如下内容:
Port 2222 #默认的是22,但是windows有自己的ssh服务,也是监听的22端口,所以这里要改一下
UsePAM no
PasswordAuthentication yes
AllowUsers yourusername # 这里改成你登陆WSL用的
5.启动ssh server
sudo service ssh --full-restart //xshell 登陆 ubuntu on windows 了,IP 是 127.0.0.1 打开的linux窗口不能关闭


win10安装linux子系统(wsl)_其它_08