Windows SubSystem for Linux

Install Ubuntu

Run PowerShell as administrator and input:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Install Ubuntu 18.04 LTS from Microsoft Store

Setup SSH

Remove inherent openssh-server and Installing a new openssh-server, because there are some problem with the former one.

sudo apt-get remove openssh-server
sudo apt-get install openssh-server

Edit the ssh server configuration file.

sudo vim /etc/ssh/sshd_config

Change to

PasswordAuthentication yes # no -> yes

Restart ssh service

sudo service ssh --full-restart

Change the source

back up the inherent source file

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak

create a new source file

sudo vim /etc/apt/sources.list

Paste these in it for Ubuntu 18.04 LTS.

For others, see https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse # 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

Shared File System with Windows

Yes, it is! The Ubuntu sub system can share files with windows!

For example

$ ls /mnt/
c d # as you can see, the c and d is the C and D disk partition in the windows

How to share files with Ubuntu by windows?

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

That is the root path of the Ubuntu.

Reference

[1] Windows 10 Installation Guide. https://docs.microsoft.com/zh-cn/windows/wsl/install-win10

[2] Win10 配置 Linux Ubuntu 子系统:使用教程及技巧. https://www.jianshu.com/p/5cf6849aa28f

[3] Ubuntu 镜像使用帮助. 清华大学开源软件镜像站. https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

[4] windows10 Linux子系统文件目录. https://blog.csdn.net/x356982611/article/details/80077085

Windows SubSystem for Linux的更多相关文章

  1. WSL(Windows Subsystem for Linux)--Pico Process Overview

    [转载] Windows Subsystem for Linux -- Pico Process Overview Overview This post discusses pico processe ...

  2. Windows Subsystem for Linux 环境变量

    WSL(Windows Subsystem for Linux )的环境变量是包含Linux子系统和Windows系统的,测试如下: wy@WY-PC:/mnt/c/Windows/System32$ ...

  3. WSL优化 (Windows Subsystem for Linux) Linux子系统优化配置

    目录 wsl优化 (Windows Subsystem for Linux) Linux子系统优化 1. 永久修改wsl终端字体 2. 修改Linux终端配色 3. 添加WSL到右键菜单 wsl优化 ...

  4. Running ASP.NET Core applications on Windows Subsystem for Linux

    Setting up Linux on Windows 10 First thing is to enable Windows Subsystem for Linux. It doesn’t inst ...

  5. Build SSH for Development on Windows Subsystem for Linux

    It seems that Windows Subsystem for Linux (WSL) is getting much more mature than the time when it fi ...

  6. Windows Subsystem for Linux(WSL)安装记录

    什么是WSL Windows Subsystem for Linux(简称WSL)是一个为在Windows 10上能够原生运行Linux二进制可执行文件(ELF格式)的兼容层.它是由微软与Canoni ...

  7. VSCode - 使用 WSL(Windows Subsystem for Linux)

    一开始我是只将 VSCode 集成的终端改成 WSL 的 Bash,结果发现内置的 GIt 用的还是 Windows 的 Git,Git Hooks 用的 Windows 的环境,上网搜了一下发现有很 ...

  8. WSL (Windows Subsystem for Linux) 的 VSLAM (Visual Simultaneous Localization and Mapping) 道路

    WSL 的 VSLAM 道路 以 Windows Subsystem for Linux 闯入 Visual Simultaneous Localization and Mapping 世界的艰难道路 ...

  9. Bash on Ubuntu on Windows ( Windows Subsystem for Linux)

    1 #  Bash on ubuntu on Windows http://www.cnblogs.com/anonymous-ufo/p/6143480.html 1 1 如何启用Bash on u ...

随机推荐

  1. [原]Failed connect to mirrors.cloud.aliyuncs.com:80; Connection refused

    web site : https://opsx.alibaba.com/mirror 运行后出现下面的Error: base//x86_64/other_db FAILED http://mirror ...

  2. [原]shell批量文件增删改前后缀

    改后缀 for files in `ls *`; do mv ${files} ${files}.bak; done 改后缀 rename .bak .bak2 * 去除后缀 for files in ...

  3. WKWebView实现网页静态资源优先从本地加载

    前言:最近微信的小游戏跳一跳特别的火,顺便也让h5小游戏更加的火热.另外微信小程序,以及支付宝的小程序都是用H5写的.无论是小游戏还是小程序,这些都需要加载更多的资源文件,处理更多的业务.这些都对网页 ...

  4. Scala 中方法扩展实践

    前言 这个名字不知道取得是否合适,简单来说要干的事情就是给某个类型添加一些扩展方法,此场景在各种语言中都会用到,比如 C# 语言,如果我们使用一个别人写好的类库,而又想给某个类库添加一些自己封装的方法 ...

  5. 11.4vue(3)

    2018-11-4 20:57:28 越努力越幸运!永远不要高估自己!!!!! 要主动学习!!! 快把vue看完,进行路飞项目!明天整理一下vue知识点!

  6. select 标签判断value值相同 就selected高亮

    我写的是里面嵌套php标签 <select name="bq_id[]" multiple="multiple"> <volist name= ...

  7. 登录注册页面html模版

    登录注册页面html模版 地址:http://download.csdn.net/detail/xiaosongaixiaoqian/5432033

  8. TP框架中分页类的使用

    public function test(){ $m=M('Message'); import('ORG.Util.Page');// 导入分页类 $count = $m->count();// ...

  9. 身份证运算符 is 和 is not(检查两个数据在内存当中是否是同一个值) | 逻辑运算符 and or not | 数据类型的判断 isinstance

    # ###身份证运算符 is 和 is not(检查两个数据在内存当中是否是同一个值) var1 = 6 var2 = 6 print(id(var1),id(var2)) var1 = " ...

  10. Tomcat不加项目名称访问设置

    一.Tomcat不加项目名称访问设置 一.方法一:修改配置文件server.xml 1.修改配置文件server.xml <Host appBase="webapps" au ...