Win10 Sub Linux

发布于 2020-11-08  298 次阅读


Win10支持Linux子系统的安装

  1. 将Win10升级到最新版本
  2. 打开Win10开发者模式
  3. 在程序与功能里打开基于Win10的Linux子系统功能
  4. 在Win10应用商店安装相应的Linux版本

Win10子系统支持界面程序

  1. 基于XServer方式
    1. Windows安装VcXsrv
    2. 在Linux中运行程序DISPLAY=:0 firefox
    3. 安装桌面sudo apt install xfce4 dbus-x11 //安装xfce4 DISPLAY=:0 xfce4-session //运行linux桌面

安装 ubuntu-desktop,unity 和 ccsm 并配置

在终端输入指令进行安装

sudo apt-get install ubuntu-desktop unity compizconfig-settings-manager

打开 ccsm

ccsm

若遇到 ccsm 报如下错误

AttributeError: 'NoneType' object has no attribute 'get_default_screen'

解决方法如下

export DISPLAY=:0  
dconf reset -f /org/compiz/  
unity --reset-icons  

在 VcXsrv Server 中会出现配置界面,按下图进行配置,按 Close 退出

VcXsrv Server Cfg 1
VcXsrv Server Cfg 2

启动Unity桌面

compiz

等待十几秒后即可显示Ubuntu桌面

问题

20200820

无法联网

解决方法:

/mnt/c/Windows/system32/ipconfig.exe /all | grep --color=auto "DNS Servers" | cut -d ":" -f 2 | grep --color=auto -e '^ [0-9]' | sed 's/^/nameserver/'| sudo tee /etc/resolv.conf > /dev/null

朝闻道,夕死可矣