Summary of Windows SubSystem for Linux

Summary of 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

# 默认注释了源码镜像以提高 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

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/

原文地址:https://www.cnblogs.com/fengyubo/p/10008357.html

时间: 2024-08-01 12:33:36

Summary of Windows SubSystem for Linux的相关文章

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 install Linux but gets Windows ready for it. Linux support is Windows feature and it must be activated from Windows Features dialog. After installing the

Windows Subsystem for Linux 环境变量

WSL(Windows Subsystem for Linux )的环境变量是包含Linux子系统和Windows系统的,测试如下: [email protected]:/mnt/c/Windows/System32$ python -V Python 2.7.12 [email protected]-PC:/mnt/c/Windows/System32$ python.exe -V Python 2.7.14 [email protected]-PC:/mnt/c/Windows/System

WSL(Windows Subsystem for Linux)的安装与使用

有关WSL的介绍这里就不做解释了.另外,本文仅适用于win10 build 16215以及之后的版本,之前的版本可参考官方链接. (可使用“winver”命令查看windows版本号) 安装: 1.  管理员权限运行powershell并运行下面的命令: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux 或者:控制面板->程序和功能->启用或关闭Windows功能->勾

WSL(Windows Subsystem for Linux)的存放目录

win10子系统把windows的底层接口做了个转换到Linux从而能运行linux,但是他在安装的时候并没有提供安装位置的选项.(还有hyper v) 现在,所有从商店安装的发行版都存在于以下目录中 C:\Users<username>\AppData\Local\Packages 对于Ubuntu则在Packages目录下的CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState中 对于其他发行版则其组织名会有变化 全路径

wsl(Windows Subsystem for Linux)安装简易指南

1. 在“启用或关闭Windows功能”窗口中打开“适用于Linux的Windows子系统”: 2. 让你的Windows更新程序将你的Windows更新到最新版本: 3. 在Microsoft Store中搜索Linux: 4. 选择你喜欢的Linux.其实我想要CentOS,可惜没有,只好ubuntu.这里系统会检测你的Windows版本,若不满足要求会在页面下方画个叉叉给你: 5. 安装完成后从开始菜单选择ubuntu: 6. 继续提示你需要a few miniutes.但是我等了我好多m

Windows Subsystem for Linux(wsl)使用

由于项目有一些环境需要在linux环境运行.可用微软win10的WSL来搭配使用 安装wsl 控制面板--程序和功能--启用或关闭windows功能 原文地址:https://www.cnblogs.com/huluwaa/p/9759971.html

WSL(Windows Subsystem for Linux) 适用于Linux的Windows子系统

打开 Microsoft Store , 搜索 Linux .选择 Ubuntu , 仔细看介绍,尤其是安装前的说明 ==========================================================================================安装时遇到的问题: 1win10应用商店出现请稍后重试 我们这边出了错误 按住Windows键+R键,输入"wsreset",重置应用商店 原文地址:https://www.cnblogs.c

WSL(Windows Subsystem for Linux)的安装与使用及 mongodb安装

有关WSL的介绍这里就不做解释了.另外,本文仅适用于win10 build 16215以及之后的版本,之前的版本可参考官方链接. (可使用“winver”命令查看windows版本号) 安装:1.  管理员权限运行powershell并运行下面的命令: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux或者:控制面板->程序和功能->启用或关闭Windows功能->勾选 

WSL(Windows Subsystem for Linux) Ubuntu 下byobu状态栏错误的问题

关于WSL的,Win10 的Linux子系统如何安装,就不赘述了,Win10商店里就有,至于win7和win8.1想装这个估计也不行,所以跳过. 最近处于好奇,也懒得弄VMware的虚拟机(那玩意儿占内存太多了),就整了个来玩下,兴奋之余也测试了一些命令行分屏工具,后来决定下来用byobu. 一.直接打开Ubuntu界面的问题 如图,原本的状态栏直接显示错误,此时我的字体是fira code(这个很重要,后面会提到.) 二.Windows Terminal下的显示 上图这样自然不是我想要的效果,