WSL(Windows Subsystem for Linux) 适用于Linux的Windows子系统
1. 打开控制面板,打开启用或者关闭windows功能窗口
2. 升级wsl 2
旧版 WSL 的手动安装步骤 | Microsoft Learn
3.打开microsoft store安装ubutun
4.打开Ubuntu 设置账号密码
5.更换 Linux 子系统的软件源并更新软件
安装nano 文本编辑器
sudo apt-get install nano
ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站 (aliyun.com)
修改镜像地址
sudo nano /etc/apt/sources.list
修改完毕,然后Ctrl+O,按回车,再Ctrl+X,保存退出
更新软件
sudo apt-get update -y
sudo apt-get upgrade -y
6.安装Gnome
安装gnome桌面环境
sudo apt-get install ubuntu-desktop
安装相关工具
sudo apt-get install gnome-tweak-tool
7.安装## systemctl
git clone https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git
cd ubuntu-wsl2-systemd-script/
bash ubuntu-wsl2-systemd-script.sh
8.管理员模式打开PowerShell
停止服务
net stop LxssManager
启动服务
net start LxssManager
9.安装远程控制软件xrdp
#安装xrdp远程控制服务
sudo apt-get install xrdp
配置启动session
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
配置启动session
echo "gnome-session" > ~/.xsession
重新启动xrdp服务
sudo systemctl restart xrdp
查看xrdp服务状态
sudo systemctl status xrdp
10.远程桌面连接localhost:3390
Gnome 安装成功!!!!恭喜!!!