笔者在安装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
边栏推荐
猜你喜欢
use Xunit.DependencyInjection Transformation test project
微服务的出现和意义的探索
Everything is 2020, LINQ query you are still using expression tree
什么都2020了,LINQ查询你还在用表达式树
学习Scala IF…ELSE 语句
【解决方案】分布式定时任务解决方案
[solution] distributed timing task solution
Cryptography - Shangsi Valley
Reflection on a case of bus card being stolen and swiped
计组-总线通信控制之异步串行通信的数据传输
随机推荐
awk实现类sql的join操作
Privacy violation and null dereference of fortify vulnerability
Web安全(三)---CSRF攻击
Face recognition: attack types and anti spoofing techniques
Go之发送钉钉和邮箱
Reflection on a case of bus card being stolen and swiped
QT hybrid Python development technology: Python introduction, hybrid process and demo
More than 50 object detection datasets from different industries
Data transmission of asynchronous serial communication controlled by group bus communication
VC6 compatibility and open file crash resolution
Golang anonymous structure member, named structure member, inheritance, composition
Ladongo open source full platform penetration scanner framework
Judging whether paths intersect or not by leetcode
京淘项目day09
什么都2020了,LINQ查询你还在用表达式树
UCGUI简介
2020-11-07:已知一个正整数数组,两个数相加等于N并且一定存在,如何找到两个数相乘最小的两个数?
[solution] distributed timing task solution
ROS学习---远程启动ROS节点
A compilation bug brought by vs2015 Update1 update [existing solutions]