笔者在安装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
边栏推荐
- C++在C的基础上改进了哪些细节
- Adobe media encoder / me 2021 software installation package (with installation tutorial)
- Qt混合Python开发技术:Python介绍、混合过程和Demo
- 团灭 LeetCode 股票买卖问题
- Cpp(二) 创建Cpp工程
- C语言I博客作业03
- Problems of Android 9.0/p WebView multi process usage
- Ladongo open source full platform penetration scanner framework
- 来自不同行业领域的50多个对象检测数据集
- GET,POST,PUT,DELETE,OPTIONS用法与说明
猜你喜欢

C/C++编程笔记:C语言相比其他编程语言,有什么不一样的优势?

C language I blog assignment 03

The instanceof operator in ecmascript7 specification

GoLand writes a program with template

Basic operation of database

Data transmission of asynchronous serial communication controlled by group bus communication

The real-time display of CPU and memory utilization rate by Ubuntu

使用 Xunit.DependencyInjection 改造测试项目
![[solution] distributed timing task solution](/img/3b/00bc81122d330c9d59909994e61027.jpg)
[solution] distributed timing task solution

密码学-尚硅谷
随机推荐
C language I blog assignment 03
Thinkphp6中where条件中字段与字段比较条件的写法
手撕算法-手写单例模式
GET,POST,PUT,DELETE,OPTIONS用法与说明
面部识别:攻击类型和反欺骗技术
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
Web Security (1) -- browser homology strategy
来自不同行业领域的50多个对象检测数据集
Summary of knowledge points of Jingtao project
Web Security (4) -- XSS attack
0.计算机简史
QT hybrid Python development technology: Python introduction, hybrid process and demo
Tail delivery
GoLand writes a program with template
Problems of Android 9.0/p WebView multi process usage
Wanxin Finance
【解决方案】分布式定时任务解决方案
Go sending pin and email
Speed up your website with jsdelivr
Idea - the. IML file was not automatically generated by the project