Windows10内嵌Ubuntu子系统初始化设置
第一次启动
重启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
图形化界面
更新
sudo apt-get update
开始安装图形化界面
sudo apt-get install xorg
sudo apt-get install xfce4
sudo apt-get install xrdp
配置远程端口为3390
sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
向xsession中写入xfce4-session
sudo echo xfce4-session >~/.xsession
重启xrdp服务
sudo service xrdp restart
如果有防火墙,允许就好了。
在Cortana中搜索远程桌面连接,点击进入,输入本机IP:端口,以及子系统用户名(在步骤2中,终端窗口@符号之前)
- 登陆成功,显示Ubuntu的图形界面。
踩过的坑:我的win10和ubuntu的用户名相同,都是我的姓名全拼。使用远程桌面登陆时,连接成功后闪退,后来改用root登陆就可以了。
安装docker
ubuntu版本为16.04
- 使用阿里云的镜像
- 使用阿里云的docker镜像
- 安装后,使用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子系统初始化设置的更多相关文章
- Windows10内嵌Ubuntu子系统配置python开发环境
Windows10内嵌Ubuntu子系统配置python开发环境 安装pycharm. 到intellij idea网站下载Linux环境下载免费的pycharm,通过ubuntu子系统内部的/mnt ...
- Windows10内置ubuntu子系统安装后中文环境设置
原文:Windows10内置ubuntu子系统安装后中文环境设置 第一开启相关设置,使用小娜(Win键+c)直接查找关键字打开更快. ①设置→查找"针对开发人员"→开发人员模式 ...
- [转]Windows10内置Linux子系统初体验
Windows10内置Linux子系统初体验 https://www.jianshu.com/p/bc38ed12da1d
- spring-boot内嵌三大容器https设置
spring-boot内嵌三大容器https设置 spring-boot默认的内嵌容器为tomcat,除了tomcat之前还可以设置jetty和undertow. 1.设置https spring-b ...
- Windows10内置Linux子系统
WSL 前言 前段时间,机子上的win10又偷偷摸摸升级到了一周年正式版,比较无奈.不过之前听闻这个版本已经支持内置的linux子系统,于是就怀着好奇心试玩了一把.虽然期间遇到了很多问题,但总体来 ...
- Windows10内置Linux子系统初体验
http://www.jianshu.com/p/bc38ed12da1dhttp://www.jianshu.com/p/bc38ed12da1d WSL 前言 前段时间,机子上的win10又偷偷摸 ...
- windows10开启内置ubuntu系统,使用xshell连接
windows安装配置ubuntu系统内置子系统 官方文档:https://docs.microsoft.com/zh-cn/windows/wsl/about https://www.jianshu ...
- 系统 (一) Windows10安装Ubuntu子系统
前言 本文将基于 Windows10专业版 安装 Ubuntu子系统 1.控制面板 -> 程序 -> 选择启用或关闭Windows功能 -> 勾上 适用Linux的Windwos子系 ...
- Windows10 下运行Linux子系统
关于Windows10 下运行Linux子系统: Windows10内置Linux子系统初体验:http://www.jianshu.com/p/bc38ed12da1d Win10运行Ubuntu版 ...
随机推荐
- 如何让in/exists 子查询(半连接)作为驱动表?
一哥们问我,怎么才能让子查询作为驱动表? SQL如下: select rowid rid from its_car_pass7 v where 1 = 1 and pass_datetime > ...
- Python--day38---进程间通信--初识队列(multiprocess.Queue)
初识队列: 进程间通信IPC(Inter-Process Communication) 1,队列的方法: q = Queue(5)1,q.put(1) #把1放进队列 2,print(q.full() ...
- java 使用反射调用可变参数方法
使用反射操作对象-调用可变参数方法 要把可变参数都当做是其对应的数组类型参数; 如 show(XX... is)作为show(XX[] is)调用; 若可变参数元素类型是引用类型: JDK内部接收到参 ...
- junit 测试套件Suite
junit测试套件,就是可以运行一个测试类使得一个或一些测试类被junit测试运行 见代码: 测试套件类: import org.junit.runner.RunWith; import org.ju ...
- Linux 标准 C 类型的使用
尽管大部分程序员习惯自由使用标准类型, 如 int 和 long, 编写设备驱动需要一些小心 来避免类型冲突和模糊的 bug. 这个问题是你不能使用标准类型, 当你需要"一个 2-字节 填充 ...
- ZR提高失恋测4
ZR提高失恋测4 比赛链接 A (方便讨论,设读入的串为\(S,T\)答案串为\(A\)) 首先\(*\)只会有一个 这是这道题目中非常重要的一个结论 简单证明一下? 因为\(*\)可以代表所有的字符 ...
- Educational Codeforces Round 61
Educational Codeforces Round 61 今早刚刚说我适合打pikmike出的EDU 然后我就挂了 A 不管 B 不管 C 这道题到快结束了才调出来 大概就是\(n^2\)枚举不 ...
- oracle 包 简单使用
理解PL/SQL包 简介 包(package)的主要作用是用于逻辑组合相关的PL/SQL类型 比如记录类型或者集合类型,PL/SQL游标或游标声明以及PL/SQL子程序 还可以包含任何可以在块的声明区 ...
- opacity兼容性以及存在问题处理
opacity兼容性以及存在问题处理 opacity兼容性 opacity属性是CSS3的属性,用于设置元素的不透明级别.语法: opacity: value | inherit; ①值value表示 ...
- HDU6578 2019HDU多校训练赛第一场 1001 (dp)
HDU6578 2019HDU多校训练赛第一场 1001 (dp) 传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6578 题意: 你有n个空需要去填,有 ...