笔者在安装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
边栏推荐
- Fortify漏洞之 Privacy Violation(隐私泄露)和 Null Dereference(空指针异常)
- Web安全(四)---XSS攻击
- Ladongo open source full platform penetration scanner framework
- Supervisor process management installation and use
- The emergence and significance of micro service
- Cpp(二) 创建Cpp工程
- 汇编函数mcall systemstack asmcgocall syscall
- golang 匿名结构体成员,具名结构体成员,继承,组合
- Search and replace of sed
- Using subprocess residue in supervisor and python multiprocessing
猜你喜欢
Delphi10's rest.json And system.json Step on the pit
The road of cloud computing: a free AWS cloud server
QT hybrid Python development technology: Python introduction, hybrid process and demo
Introduction to ucgui
Hand tearing algorithm - handwritten singleton mode
The emergence and significance of micro service
Jingtao project day09
Reflection on a case of bus card being stolen and swiped
构造请求日志分析系统
Learn Scala if Else statement
随机推荐
爆一个VS2015 Update1更新带来的编译BUG【已有解决方案】
Using subprocess residue in supervisor and python multiprocessing
Qt混合Python开发技术:Python介绍、混合过程和Demo
ECMAScript7规范中的instanceof操作符
C语言I博客作业03
汇编函数mcall systemstack asmcgocall syscall
A compilation bug brought by vs2015 Update1 update [existing solutions]
ubuntu实时显示cpu、内存占用率
学习Scala IF…ELSE 语句
golang 匿名结构体成员,具名结构体成员,继承,组合
Lay UI left tree Dtree right list table
The software in your host has terminated an established connection. resolvent
Everything is 2020, LINQ query you are still using expression tree
Insight -- the application of sanet in arbitrary style transfer
Cpp(一) 安装CMake
laravel8更新之维护模式改进
Improvement of maintenance mode of laravel8 update
Get tree menu list
The emergence and significance of micro service
手撕算法-手写单例模式