--- notion-id: 0347343a-93a0-4fdf-966f-cbff3951858b --- 设置wsl版本 `wsl --set-default-version 2` 查看wsl版本 `wsl -l -v` 更新安装库并安装xfce4 `sudo apt update && sudo apt install xfce4` 安装远程软件,放在阿里云盘内: [https://sourceforge.net/projects/vcxsrv/](https://sourceforge.net/projects/vcxsrv/) 注意要点:`配置时注意端口为0,并且取消控制,并且防火墙入站和出站都配置允许,可以使用Fab_x64设置` 编辑 `nano ~/.bashrc`,添加以下内容: `export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0` 以上指令自动获取主机ip【因为主机IP会变动】 更新文件`source ~/.bashrc` 通过root权限开启`sudo startxfce4` **参考文献:** [https://zhuanlan.zhihu.com/p/436441212](https://zhuanlan.zhihu.com/p/436441212) [https://zhuanlan.zhihu.com/p/576320322](https://zhuanlan.zhihu.com/p/576320322)