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. linux的shadow文件

    在<Python绝技>这本书的第一个小程序首先展示了针对与unix系统中shadow文件密码的暴力破解的能力,因为之前只是对shadow文件停留在保存了用户密码的阶段,但并没有详细研究,所 ...

  2. 把Oracle由归档模式改为非归档模式

    把Oracle由归档模式改为非归档模式 开始–>运行命令cmd进入命令行模式 1. 使用命令sqlplus以无日志形式打开如下: sqlplus /nolog; 2. 连接数据库dev.worl ...

  3. 31、cookie小test

    请尽量使用JQuery进行代码编写,需求如下: 1.  页面初始化样式如图 2. 顶部input框中输入内容,按下回车enter键后,“正在进行” 列表中加入该条内容.   3. 顶部input框中输 ...

  4. Hadoop 跨集群访问

    [原文地址] 跨集群访问 发表于 2015-06-01   |   简单总结下跨集群访问的多种方式. 跨集群访问HDFS 直接给出HDFS URI 我们平常执行hadoop fs -ls /之类的操作 ...

  5. 窗口,父窗口parentwindow,所有者窗口ownerwindow

    参考文档:http://www.cnblogs.com/fwycmengsoft/p/4026592.html 一. parent:创建者,owner:所有者 小玉的父母生下小玉,养到8岁,卖给贾府当 ...

  6. 使用 ASP.NET SignalR实现实时通讯

    ASP.NET SignalR 是为 ASP.NET 开发人员提供的一个库,可以简化开发人员将实时 Web 功能添加到应用程序的过程.实时 Web 功能是指这样一种功能:当所连接的客户端变得可用时服务 ...

  7. eclipse连接mysql数据库实现怎删改查操作实例(附带源码)

    package model; public class User { private int id; private String name; private String password; pub ...

  8. 关于0x3f3f3f3f

    发现有人把无穷大设成0x3f3f3f3f,好像还真不是随便设的. 0x3f3f3f3f比10^9大一点,比一般数据范围大: 乘2之后比2147483467小,满足正无穷加正无穷还是正无穷: 每个字节都 ...

  9. PE就是市盈率的缩写 PB是平均市净率的缩写

    PE就是市盈率的缩写 PB是平均市净率的缩写 以下为百科知识 PE Price/Earnings 市盈率 也有叫做PER的,Price/Earnings Ratio 本益比,价格收益比,市盈率 市盈率 ...

  10. Python idle运行代码出现'ascii' codec can't encode characters in position 0-2

    编码问题,采用一种方法: Python代码 ,开头加: import sys reload(sys) sys.setdefaultencoding('utf8') 在idle中运行后没错误,但是不显示 ...