在windows环境下,通过WSL2安装Debian11和gnome桌面环境,并利用xrdp进行远程访问。
1. WSL2及Debian11安装
WSL2安装:
wsl --install
指定WSL版本(optional):
wsl --set-default-version 2
安装Debian11:
wsl -l -o # 查看可供安装的linux版本
wsl --install --d Debian # 安装对应的版本
查看已安装的 Linux 分发版信息:
wsl -l -v
Note: 可通过 --export
和 --import
命令修改Linux系统的安装位置 。
2. WSL2启用systemd
在 /etc
路径下添加 wsl.conf 文件,文件内容如下:
[boot]
systemd=true
重启WSL2:
wsl --shutdown
重启后,可通过 systemctl
命令查看 systemd 是否已生效。
3. Debian11换源
Debian11国内源:
# 中科大镜像
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb