笔者在安装Ubuntu子系统(wls)时发现网上的帖子参差不齐,不能给新手一个简单而直接的教程,所以笔者自己总结了一个简单的安装教程供新手们参考(大佬勿喷)。
接下来直接进入正题:
1.进入MicrosoftStore搜索Ubuntu,选择Ubuntu 18.04LTS(当然其他也可以),点击安装。
2.安装完成后,点击电脑左下角(或者按Win建)找到最近添加,点击进入Ubuntu。
3.等待一会儿后,输入用户名和密码创建用户。
4.输入sudo su命令进入管理员模式(也可以不进入,不输入该命令的话下面全部命令需要最前面都加上sudo )。
5.首先安装vim,以便给我们的Ubuntu进行换源。
命令:apt-get install vim
6.安装好vim后输入vim /etc/apt/sources.list
意思是在/etc/apt/目录下建立一个叫做sources.list的文件并进入,命令完成后点击键盘上的i进入Insert模式(编辑文本),将所有的行前面都加上#(注释掉),或者将他们都删除
进入网址https://mirrors.tuna.tsinghua...
选择自己系统所匹配的源(这里是18.04),复制下来粘贴到之前进入的sources.list文件中,按下ESC(退出Insert模式),输入:wq(退出并保存),回到命令行。
这里使用的是清华的源(个人认为比较好用),如有需要可去网上搜索其他的源。
7.输入apt-get update进行更新。
8.接下来就可以安装自己需要的软件啦。
命令格式为:apt-get install 软件包名称。
这里安装一个gcc编译器:
apt-get install gcc
以上就是安装Ubuntu的全部过程了,是不是很简单,接下来我们进行可视化界面的安装(可有可无,根据需要自行选择):
1.输入命令sudo su进入管理员模式。
然后输入以下命令:
2.apt-get update
3.apt-get install xorg
4.apt-get install xfce4
5.apt-get install xrdp
6.apt-get install vnc4server
7.sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini
8.echo xfce4-session >~/.xsession
9.service xrdp restart
这里就不进行过多解释了,输入完成后回到Windows按下Win+R,输入mstsc按下enter键,输入127.0.0.1:3390后点击连接就可进入可视化界面啦。
注意:安装可视化界面之后每次电脑关机之后再开启都需要进入Ubuntu的命令行输入sudo service xrdp restart,目的是开启Ubuntu的xrdp(远程桌面链接),然后再从Windows系统进入连接就可以了。
当前位置:网站首页>Windows下子系统Ubuntu安装
Windows下子系统Ubuntu安装
2020-11-07 23:56:00 【Fitar】
版权声明
本文为[Fitar]所创,转载请带上原文链接,感谢
https://segmentfault.com/a/1190000037758743
边栏推荐
- Got timeout reading communication packets解决方法
- 1. In depth istio: how is sidecar auto injection realized?
- [original] the influence of arm platform memory and cache on the real-time performance of xenomai
- More than 50 object detection datasets from different industries
- 获取树形菜单列表
- UCGUI简介
- Everything is 2020, LINQ query you are still using expression tree
- supervisor进程管理安装使用
- Thinkphp6中where条件中字段与字段比较条件的写法
- The real-time display of CPU and memory utilization rate by Ubuntu
猜你喜欢
C语言I博客作业03
Introduction to ucgui
微信小程序request报400错误 @RequestBody接收不到
Insight -- the application of sanet in arbitrary style transfer
C / C + + Programming Notes: what are the advantages of C compared with other programming languages?
鼠标变小手
Get tree menu list
On the stock trading of leetcode
来自不同行业领域的50多个对象检测数据集
16.文件传输协议、vsftpd服务
随机推荐
Android 9.0/P WebView 多进程使用的问题
C/C++编程笔记:C语言相比其他编程语言,有什么不一样的优势?
Adobe Lightroom /Lr 2021软件安装包(附安装教程)
Get tree menu list
The software in your host has terminated an established connection. resolvent
Web安全(一)---浏览器同源策略
Wechat applet request reported 400 error @ requestbody failed to receive
Face recognition: attack types and anti spoofing techniques
Qt混合Python开发技术:Python介绍、混合过程和Demo
Qt混合Python开发技术:Python介绍、混合过程和Demo
Jingtao project day09
UCGUI简介
2020天翼智能生态博览会中国电信宣布5G SA正式规模商用
delphi10的rest.json与system.json的踩坑
android基础-RadioButton(单选按钮)
The instanceof operator in ecmascript7 specification
京淘项目day09
微服务的出现和意义的探索
VC6 compatibility and open file crash resolution
关于update操作并发问题