笔者在安装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
边栏推荐
猜你喜欢
Delphi10's rest.json And system.json Step on the pit
手撕算法-手写单例模式
delphi10的rest.json与system.json的踩坑
2020-11-07:已知一个正整数数组,两个数相加等于N并且一定存在,如何找到两个数相乘最小的两个数?
1. In depth istio: how is sidecar auto injection realized?
IDEA-项目未自动生成 .iml 文件
Improvement of maintenance mode of laravel8 update
学习Scala IF…ELSE 语句
GoLand writes a program with template
Fortify漏洞之 Privacy Violation(隐私泄露)和 Null Dereference(空指针异常)
随机推荐
Supervisor process management installation and use
What details does C + + improve on the basis of C
Judging whether paths intersect or not by leetcode
Everything is 2020, LINQ query you are still using expression tree
Web安全(三)---CSRF攻击
微服务的出现和意义的探索
High concurrency in ngnix cluster
Got timeout reading communication packets解决方法
Reflection on a case of bus card being stolen and swiped
14000 word distributed transaction principle analysis, master all of them, are you afraid of being asked in the interview?
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
Wanxin Finance
什么都2020了,LINQ查询你还在用表达式树
Speed up your website with jsdelivr
到底选openstack还是vmware?
面部识别:攻击类型和反欺骗技术
Android Basics - RadioButton (radio button)
Golang anonymous structure member, named structure member, inheritance, composition
Web安全(一)---浏览器同源策略
use Xunit.DependencyInjection Transformation test project