Loading [MathJax]/jax/output/CommonHTML/config.js
前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >WIN10下创建Ubuntu18.04子系统及安装图形界面

WIN10下创建Ubuntu18.04子系统及安装图形界面

原创
作者头像
好派笔记
修改于 2021-09-17 09:00:34
修改于 2021-09-17 09:00:34
3.1K0
举报
文章被收录于专栏:好派笔记好派笔记
一.开启WIN10子系统WSL

1.设置开发人员工作模式

设置——>更新和安全——>针对开发人员——>开发人员模式

2.启用WINDOWS子系统功能

控制面板——>程序——>程序和功能——>启用或关闭Windows功能——>适用于Linux的Windows子系统——>确定 (然后重启)

二、在应用商店里安装ubuntu

打开微软件应用商店,搜索ubuntu,然后安装

安装完成后,子系统放在这里:

三.进入子系统并查看当前版本信息

root@moonrong:~# lsb_release -a

  1. No LSB modules are available.  
  2. Distributor ID: Ubuntu  
  3. Description:    Ubuntu 18.04.1 LTS  
  4. Release:        18.04  
  5. Codename:       bionic  
  6. root@moonrong:~#

四.修改默认源为阿里云镜像并更新

1.确认默认源并查看

  1. root@moonrong:~# cat /etc/apt/sources.list
  2. # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
  3. # newer versions of the distribution.
  4. deb http://archive.ubuntu.com/ubuntu/ bionic main restricted  
  5. # deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted
  6. ## Major bug fix updates produced after the final release of the
  7. ## distribution.
  8. deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted  
  9. # deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
  10. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  11. ## team. Also, please note that software in universe WILL NOT receive any
  12. ## review or updates from the Ubuntu security team.
  13. deb http://archive.ubuntu.com/ubuntu/ bionic universe  
  14. # deb-src http://archive.ubuntu.com/ubuntu/ bionic universe
  15. deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe  
  16. # deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates universe
  17. ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
  18. ## team, and may not be under a free licence. Please satisfy yourself as to
  19. ## your rights to use the software. Also, please note that software in
  20. ## multiverse WILL NOT receive any review or updates from the Ubuntu
  21. ## security team.
  22. deb http://archive.ubuntu.com/ubuntu/ bionic multiverse  
  23. # deb-src http://archive.ubuntu.com/ubuntu/ bionic multiverse
  24. deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse  
  25. # deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
  26. ## N.B. software from this repository may not have been tested as
  27. ## extensively as that contained in the main release, although it includes
  28. ## newer versions of some applications which may provide useful features.
  29. ## Also, please note that software in backports WILL NOT receive any review
  30. ## or updates from the Ubuntu security team.
  31. deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse  
  32. # deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
  33. ## Uncomment the following two lines to add software from Canonical's
  34. ## 'partner' repository.
  35. ## This software is not part of Ubuntu, but is offered by Canonical and the
  36. ## respective vendors as a service to Ubuntu users.
  37. # deb http://archive.canonical.com/ubuntu bionic partner
  38. # deb-src http://archive.canonical.com/ubuntu bionic partner
  39. deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted  
  40. # deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted
  41. deb http://security.ubuntu.com/ubuntu/ bionic-security universe  
  42. # deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe
  43. deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse  
  44. # deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse
  45. root@moonrong:~#

2.修改默认源

1)备份原配置文件

  1. root@moonrong:~# cp /etc/apt/sources.list /etc/apt/sources.list.mybak20190227
  2. root@moonrong:~#

2)修改源为阿里云镜像

用VIM进行替换

  1. root@moonrong:~# vim /etc/apt/sources.list
  2. root@moonrong:~#
  3. :%s/security.ubuntu/mirrors.aliyun/g  
  4. :%s/archive.ubuntu/mirrors.aliyun/g  

3.更新

  1. root@moonrong:~# apt update
  2. Get:1 http://mirrors.aliyun.com/ubuntu xenial InRelease [247 kB]  
  3. Get:2 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease [109 kB]  
  4. Get:3 http://mirrors.aliyun.com/ubuntu xenial-security InRelease [109 kB]  
  5. Get:4 http://mirrors.aliyun.com/ubuntu xenial/main amd64 Packages [1,201 kB]  
  6. Get:5 http://mirrors.aliyun.com/ubuntu xenial/main Translation-en [568 kB]  
  7. Get:6 http://mirrors.aliyun.com/ubuntu xenial/restricted amd64 Packages [8,344 B]  
  8. Get:7 http://mirrors.aliyun.com/ubuntu xenial/restricted Translation-en [2,908 B]  
  9. Get:8 http://mirrors.aliyun.com/ubuntu xenial/universe amd64 Packages [7,532 kB]  
  10. Get:9 http://mirrors.aliyun.com/ubuntu xenial/universe Translation-en [4,354 kB]  
  11. Get:10 http://mirrors.aliyun.com/ubuntu xenial/multiverse amd64 Packages [144 kB]  
  12. Get:11 http://mirrors.aliyun.com/ubuntu xenial/multiverse Translation-en [106 kB]  
  13. Get:12 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 Packages [913 kB]  
  14. Get:13 http://mirrors.aliyun.com/ubuntu xenial-updates/main Translation-en [368 kB]  
  15. Get:14 http://mirrors.aliyun.com/ubuntu xenial-updates/restricted amd64 Packages [7,556 B]  
  16. Get:15 http://mirrors.aliyun.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]  
  17. Get:16 http://mirrors.aliyun.com/ubuntu xenial-updates/universe amd64 Packages [732 kB]  
  18. Get:17 http://mirrors.aliyun.com/ubuntu xenial-updates/universe Translation-en [302 kB]  
  19. Get:18 http://mirrors.aliyun.com/ubuntu xenial-updates/multiverse amd64 Packages [16.6 kB]  
  20. Get:19 http://mirrors.aliyun.com/ubuntu xenial-updates/multiverse Translation-en [8,440 B]  
  21. Get:20 http://mirrors.aliyun.com/ubuntu xenial-security/main amd64 Packages [615 kB]  
  22. Get:21 http://mirrors.aliyun.com/ubuntu xenial-security/main Translation-en [254 kB]  
  23. Get:22 http://mirrors.aliyun.com/ubuntu xenial-security/restricted amd64 Packages [7,204 B]  
  24. Get:23 http://mirrors.aliyun.com/ubuntu xenial-security/restricted Translation-en [2,152 B]  
  25. Get:24 http://mirrors.aliyun.com/ubuntu xenial-security/universe amd64 Packages [425 kB]  
  26. Get:25 http://mirrors.aliyun.com/ubuntu xenial-security/universe Translation-en [171 kB]  
  27. Get:26 http://mirrors.aliyun.com/ubuntu xenial-security/multiverse amd64 Packages [5,600 B]  
  28. Get:27 http://mirrors.aliyun.com/ubuntu xenial-security/multiverse Translation-en [2,676 B]  
  29. Fetched 18.2 MB in 10s (1,802 kB/s)  
  30. Reading package lists... Done  
  31. Building dependency tree  
  32. Reading state information... Done  
  33. 208 packages can be upgraded. Run 'apt list --upgradable' to see them.  
  34. root@moonrong:~#
五.安装图形界面相关软件及配置过程

1.安装VcSrv

下载VcSrv并在WIN10上安装

https://sourceforge.net/projects/vcxsrv/

安装完成后启动Xlaunch

按上图完成设置,并一直按下一步直到出现下图界面

2安装ubuntu-desktop,unity,ccsm

  1. root@moonrong:~#apt-get install ubuntu-desktop unity compizconfig-settings-manager

3.配置ccsm

在XLaunch启动的情况下输入

  1. root@moonrong:~# export DISPLAY=localhost:0
  2. root@moonrong:~# ccsm

配置完成后点击close关闭

4.开启桌面

root@moonrong:~#compiz

最终启动完成,WIN10下界面如上图所示。

六.如何重启windows 10子系统(WSL)ubuntu

WSL子系统是基于LxssManager服务运行的

在WIN10的CMD命令下输入下面命令完成重启

net stop LxssManager

net start LxssManager

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
Ubuntu 更换国内源[通俗易懂]
Ubuntu系统自带的源都是国外的网址,国内用户在使用的时候网速比较慢。一个软件的下载是十分痛苦的,这里讲解一下如何将国外源更换为国内源,让你的网速Biu.Biu.Biu
全栈程序员站长
2022/08/19
5.9K0
更新Ubuntu软件源
原有的软件源的存储路径是/etc/apt/sources.list,文件内容如下。
全栈程序员站长
2022/09/15
1.5K0
更新Ubuntu软件源
Ubuntu18.04更换国内源
Ubuntu18.04更换国内源 原文地址:https://www.woozee.com.cn/article/25.html
程序员小涛
2020/12/03
2K0
Ubuntu 16.04 几个国内更新源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
用户8710806
2021/06/09
2.8K0
ubuntu16.04国内apt源以及官方源
替换写在/etc/apt目录的source.list文件 腾讯云 deb http://mirrors.tencentyun.com/ubuntu/ xenial main restricted un
禹都一只猫olei
2018/05/25
12.3K1
Windows下安装Ubuntu、图形界面、下载Android源码,看这一篇就够了
自己手里有一台Windows电脑,但是工作开发都是Linux系统下进行,想着给自己的Windows电脑安装Linux系统,说干就干。
八归少年
2022/10/08
2.1K0
Windows下安装Ubuntu、图形界面、下载Android源码,看这一篇就够了
快速搭建团队的GitLab
研发效能的其实端是代码仓的管理和统一维护,通过统一的私有化的Git托管服务实现代码的内部有限共享。代码仓在研发效能的提升中占据很重要的地位,这是DevOps工具链的起始点也是工程效能提升的一个重要环节。如果没有统一代码仓库我们也无法开始研发效能、质量效能、交付效能的衡量和提高。那么下面我们就开始讲解GitLab私有化仓库平台的搭建
Criss@陈磊
2019/09/25
7450
快速搭建团队的GitLab
更换Ubuntu源为国内源的操作记录
我们都知道,Ubuntu的官方源对于国内用户来说是比较慢的,可以将它的源换成国内的源(比如阿里源),这样用起来就很快了。下面记录下更换操作: 首先了解下/etc/apt/sources.list.d文件 文件/etc/apt/sources.list是一个普通可编辑的文本文件,保存了ubuntu软件更新的源服务器的地址。 和sources.list功能一样的是/etc/apt/sources.list.d/*.list(*代表一个文件名,只能由字母、数字、下划线、英文句号组成), 该文件夹下的文件是第三方软
洗尽了浮华
2018/01/23
2.5K0
Ubuntu 换源看这一篇就够了
Ubuntu是新生代农民工比较常用的Linux系统。由于一些原因,当我们用官网的源的更新和下载包的时候,很慢、很卡、很费时间。所以,我们应该把它换成国内的源。
江涛学编程
2021/09/23
51.7K5
听说 90% 的人都在 win10 下使用 ubuntu 子系统了!
最近,遇到很多Python第三方库不支持Windows系统或则安装很繁琐要不就是要安装vc++环境,都比较麻烦,对于开发者而言,Mac真的是个不错的选择,Linux就更不用说了,一直听过Windows子系统,但是从来没有尝试过,之前都是用的虚拟机安装并使用,今天把我win10下安装、配置与使用ubuntu子系统的过程记录下来,希望对某些小伙伴有用,尽量避免踩坑。
野原测试开发
2019/08/02
26.2K1
Ubuntu - WSL系统更换国内源【WSL第三弹】
新安装了WSL-Ubuntu默认的apt源是国外的源。国内访问速度会很慢。所以更改国内源是非常有必要的。
无道
2019/11/13
35.9K0
Ubuntu - WSL系统更换国内源【WSL第三弹】
win10安装Linux子系统
开启开发者模式 系统设置 -> 更新和安全 -> 针对开发人员 -> 选择开发人员模式 image.png 启动 Windows 10 的 Linux 子系统组件 系统设置 -> 应用 -> 右侧的程
听城
2018/04/27
4.2K0
win10安装Linux子系统
第二章 Docker环境安装
Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器上,也可以实现虚拟化。容器是完全使用沙箱机制,相互之间不会有任何接口。--摘自《百度百科》
Librant
2018/11/29
9030
ubuntu linux 16.04虚拟机更新源,vmtools,编译cuckoo,make.sh转换unix编码格式
更新源 sudo vi /etc/apt/sources.list deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial
战神伽罗
2019/07/24
7940
换源系列
注意事项 不支持Arm架构电脑 apt update && apt install apt-transport-https ca-certificates mv /etc/apt/sources.list /etc/apt/sources.list.bak apt update && apt upgrade apt install net-tools iputils-ping vim wget git unzip zip proxychains -y export https_proxy=http://19
XRSec
2022/02/11
2.7K0
Win10 安装 Linux子系统 Ubuntu18.04 / Kali Linux 的体验
汇总系列:https://www.cnblogs.com/dunitian/p/4822808.html#linux
逸鹏
2018/06/09
2.4K0
Win10 安装 Linux子系统 Ubuntu18.04 / Kali Linux 的体验
Ubuntu 18.04 清华更新源 Certificate verification failed
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/163166.html原文链接:https://javaforall.cn
全栈程序员站长
2022/09/15
1.6K0
[ 利器篇 ] - Microsoft Surface Pro 系列安装 Ubuntu 16.04 系统
Microsoft Surface Pro 系列一直是平板+PC中的强者,刷新了针对PC的看法。这次由于项目的需求搭建测试环境,需要使用Ubuntu 16.04 系统,在Surface Pro 7 安装Ubuntu 16.04 进行开发体验。
程序手艺人
2020/09/15
3.9K0
[ 利器篇 ] -  Microsoft Surface Pro 系列安装 Ubuntu 16.04 系统
rancher下的kubernetes之一:构建标准化vmware镜像
本文介绍了如何通过rancher部署kubernetes集群,包括创建vmware虚拟机、配置网络、安装和配置rancher、部署kubernetes等步骤。同时,还介绍了如何备份和恢复标准化的镜像文件,以便于快速部署和迁移。
程序员欣宸
2018/01/04
1.9K0
rancher下的kubernetes之一:构建标准化vmware镜像
ubuntu 24/23/22/21/20/18/16/14 自动切换 apt 阿里云/清华/腾讯/华为/网易163 源
eisc
2024/06/14
6600
相关推荐
Ubuntu 更换国内源[通俗易懂]
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档