第一次启动

重启ubuntu

Since Windows 10 version 1803, closing all WSL terminal windows won't kill background processes by default, unless the file /var/run/reboot-required is present. This file will be automatically created by apt on Ubuntu when an update requires a reboot, but if you want to manually reboot the subsystem, you can create the file yourself:

sudo touch /var/run/reboot-required

然后关闭ubuntu的shell框就相当于关机。

I haven't tested this on other distributions available in the Microsoft Store. An alternative solution is to kill all processes yourself:

sudo killall -r '.*'

重置ubuntu,相当于重新安装

配置ubuntu镜像源

阿里源地址为:https://opsx.alibaba.com/mirror?lang=zh-CN,找到ubuntu镜像的帮助,根据提示修改/etc/apt/sources.list,然后执行sudo apt-get update。

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

图形化界面

  1. 更新

    sudo apt-get update
  2. 开始安装图形化界面

    sudo apt-get install xorg
    sudo apt-get install xfce4
    sudo apt-get install xrdp
  3. 配置远程端口为3390

    sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
  4. 向xsession中写入xfce4-session

    sudo echo xfce4-session >~/.xsession
  5. 重启xrdp服务

    sudo service xrdp restart
  6. 如果有防火墙,允许就好了。

  7. 在Cortana中搜索远程桌面连接,点击进入,输入本机IP:端口,以及子系统用户名(在步骤2中,终端窗口@符号之前)

  1. 登陆成功,显示Ubuntu的图形界面。

踩过的坑:我的win10和ubuntu的用户名相同,都是我的姓名全拼。使用远程桌面登陆时,连接成功后闪退,后来改用root登陆就可以了。

安装docker

ubuntu版本为16.04

  1. 使用阿里云的镜像
  2. 使用阿里云的docker镜像
  3. 安装后,使用sudo service docker start启动docker服务失败了,重启之后有start了两次就可以了。
   # step 1: 安装必要的一些系统工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安装GPG证书
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Step 3: 写入软件源信息
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Step 4: 更新并安装 Docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce # 安装指定版本的Docker-CE:
# Step 1: 查找Docker-CE的版本:
# apt-cache madison docker-ce
# docker-ce | 17.03.1~ce-0~ubuntu-xenial | http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial/stable amd64 Packages
# docker-ce | 17.03.0~ce-0~ubuntu-xenial | http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial/stable amd64 Packages
# Step 2: 安装指定版本的Docker-CE: (VERSION 例如上面的 17.03.1~ce-0~ubuntu-xenial)
# sudo apt-get -y install docker-ce=[VERSION]

磁盘映射

在ubuntu内部,可以进入/mnt/c等目录,操作windows10的多个磁盘。

Windows10内嵌Ubuntu子系统初始化设置的更多相关文章

  1. Windows10内嵌Ubuntu子系统配置python开发环境

    Windows10内嵌Ubuntu子系统配置python开发环境 安装pycharm. 到intellij idea网站下载Linux环境下载免费的pycharm,通过ubuntu子系统内部的/mnt ...

  2. Windows10内置ubuntu子系统安装后中文环境设置

    原文:Windows10内置ubuntu子系统安装后中文环境设置 第一开启相关设置,使用小娜(Win键+c)直接查找关键字打开更快.   ①设置→查找"针对开发人员"→开发人员模式 ...

  3. [转]Windows10内置Linux子系统初体验

    Windows10内置Linux子系统初体验 https://www.jianshu.com/p/bc38ed12da1d

  4. spring-boot内嵌三大容器https设置

    spring-boot内嵌三大容器https设置 spring-boot默认的内嵌容器为tomcat,除了tomcat之前还可以设置jetty和undertow. 1.设置https spring-b ...

  5. Windows10内置Linux子系统

      WSL 前言 前段时间,机子上的win10又偷偷摸摸升级到了一周年正式版,比较无奈.不过之前听闻这个版本已经支持内置的linux子系统,于是就怀着好奇心试玩了一把.虽然期间遇到了很多问题,但总体来 ...

  6. Windows10内置Linux子系统初体验

    http://www.jianshu.com/p/bc38ed12da1dhttp://www.jianshu.com/p/bc38ed12da1d WSL 前言 前段时间,机子上的win10又偷偷摸 ...

  7. windows10开启内置ubuntu系统,使用xshell连接

    windows安装配置ubuntu系统内置子系统 官方文档:https://docs.microsoft.com/zh-cn/windows/wsl/about https://www.jianshu ...

  8. 系统 (一) Windows10安装Ubuntu子系统

    前言 本文将基于 Windows10专业版 安装 Ubuntu子系统 1.控制面板 -> 程序 -> 选择启用或关闭Windows功能 -> 勾上 适用Linux的Windwos子系 ...

  9. Windows10 下运行Linux子系统

    关于Windows10 下运行Linux子系统: Windows10内置Linux子系统初体验:http://www.jianshu.com/p/bc38ed12da1d Win10运行Ubuntu版 ...

随机推荐

  1. 最长上升子序列问题 nlogn 实现算法的简述

    首先举个例子说明最长上升子序列(longest increasing subsequence 缩写 LIS): 1,4,6,2,3,7,5 中1,2,3,5 和1,4,6,7都是最长上升子序列,长度均 ...

  2. P1051 八皇后问题

    题目描述 在国际象棋中,皇后是同时具备象和车的攻击范围的,它可以横竖移动,也可以斜着移动.那么在一个8*8的标准国际象棋棋盘中,我们要放入8个皇后,同时皇后之间无法互相攻击,问有多少种皇后的放置方法. ...

  3. git 安装及基本配置

    git 基本上来说是开发者必备工具了,在服务器里没有 git 实在不太能说得过去.何况,没有 git 的话,面向github编程 从何说起,如同一个程序员断了左膀右臂. 你对流程熟悉后,只需要一分钟便 ...

  4. ppk on javascript 笔记(六)--BOM

    浏览器对象模型(Browser Object Model)是语言核心和DOM之间的一个过渡层,这个过渡层特指Javascript的客户端实现,它的主要任务是管理浏览器窗口并使得它们可以彼此通信.win ...

  5. 2018-2-13-Xamarin-Forms-进度条控件

    title author date CreateTime categories Xamarin Forms 进度条控件 lindexi 2018-2-13 17:23:3 +0800 2018-2-1 ...

  6. C#面试题整理(带答案)

    1.维护数据库的完整性.一致性.你喜欢用触发器还是自写业务逻辑?为什么? 答:尽可能用约束(包括CHECK.主键.唯一键.外键.非空字段)实现,这种方式的效率最好:其次用触发器,这种方式可以保证无论何 ...

  7. <Standard Template Library>标准模板库专项复习总结(一)

    看了看博客园的申请时间也一年多了...想想自己一年多以来一直处于各种划水状态,现在又要面临ACM的冲击... 还是要抓紧时间赶紧复习一下了- -毕竟校园新生赛还是有奖金的.. 1.栈 先进后出(LIF ...

  8. 从头学pytorch(三) 线性回归

    关于什么是线性回归,不多做介绍了.可以参考我以前的博客https://www.cnblogs.com/sdu20112013/p/10186516.html 实现线性回归 分为以下几个部分: 生成数据 ...

  9. Visio文本相关操作

    三种方式:双击形状输入文本,插入文本框, 文本工具 文本块工具 选择后可以对文本进行移动旋转 如果要给文本加入边框 直接显示线条就可以了 因为都是文本框 添加特殊文本: 插入符号 插入域 比如当前时间 ...

  10. 定位布局中关于z-index的一些问题

    定位布局中关于z-index的一些问题 使不同父元素的子元素不会被其他父元素遮盖 背景 两父元素相互遮盖(或部分遮盖) html如下 <div class="main"> ...