Windows10 子系统 Ubuntu安装

Windows 10 开始微软开始加入了一项新技术,就是允许在Windows系统上运行Linux子系统,据我研究该系统并不是独立的系统,而是通过了某种方式让Windows可以直接运行ELF格式的文件,该方法的优势非常的明显,就是可以节约非常多的系统资源,比我们使用的虚拟机要节约得多,而且启动速度非常快,接下来就开始安装。

请确保您的系统在以下版本以上,默认是17763以上才会有这项技术。

主机名:           DELL
OS 名称:          Microsoft Windows 10 企业版 LTSC
OS 版本:          10.0.17763 暂缺 Build 17763

1.直接在控制面板上,找到程序,程序和功能,然后点击启动或关闭windows功能。

  1. 确保你已经安装好了 适用于Linux的windows子系统,打勾并确定,然后需要重启一下的。

3.去微软官方下载你喜欢的镜像,这里我建议使用ubuntu 18.04 其他版本各种问题。

官方地址: https://docs.microsoft.com/en-us/windows/wsl/install-manual

4.然后将压缩包解压到你喜欢的任意路径下,点击ubuntu.exe运行过程中需要输入用户名密码,等待一会即可,如果出现冲突,可能是前期安装过,可以使用命令清理记录,并重新安装。

5.安装好以后打开是这样的,窗口图案时自己加的.

6.官方源下载慢,可以配置阿里云下载源地址,vim /etc/apt/sources.list 写入记录,保存并执行命令生成缓存 sudo apt update

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

7.安装图形界面,依次执行以下命令。

安装 xorg
sudo apt-get install xorg

安装xfce4
sudo apt install xfce4-terminal
sudo apt-get install xfce4

安装xrdp
sudo apt-get install xrdp

8.写入配置文件,并启动远程桌面。

配置xrdp
sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini

向xsession中写入xfce4-session
sudo echo xfce4-session >~/.xsession

重启xrdp服务 sudo service xrdp restart

9.直接使用系统自带的远程工具链接即可。登陆成功,显示Ubuntu的图形界面。

10.这个系统实在是太小了,占内存小得很,而且进程信息都可以在本机任务管理器中看到,不想玩了直接结束掉init进程,全部都会释放,方便稳定干净。

猜你喜欢

转载自www.cnblogs.com/LyShark/p/12308440.html