Windows安装Linux子系统--安装GUI界面
Windows安装Linux子系统--安装GUI界面
前段时间发现Windows可以安装Linux子系统了,恰逢电脑换了固态,还没装Linux,不如趁机体验一番!
1、准备工作
1.1、打开Windows的子系统功能
1.2、打开Windows开发人员模式
打开设置–>更新和安全–>针对开发人员,选择开发人员模式–>确定
确认后,重启电脑,系统更新配置。
2、安装Linux子系统
2.1、在Windows商店搜索安装Linux子系统
这里以安装Ubuntu为例
安装完成后,会像普通软件一样显示在开始界面
运行后需创建账户,设置密码,以后系统默认以此账户登陆。
2.2、换源,更新
自带的源安装软件时实在是慢的忍不了,这里推荐更换为阿里云的源。
建议先使用sudo -s命令更换为root用户
进入目录
1 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份
2 sudo vim /etc/apt/sources.list #修改
将阿里云的源复制进去
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
更新列表
sudo apt-get update
3、安装GUI
3.1 安装VcXsrv
下载地址 https://sourceforge.net/projects/vcxsrv/
安装以后会有两个程序,分别是XLaunch和VcXsrv,它们可以用来远程访问linux。所以其实在这里就是利用它们来访问命令行内的linux。
启动XLaunch,
选择:“one large window”,Display number设置成0,其它默认即可:
3.2 Ubuntu内安装桌面环境
建议使用root用户操作(使用sudo -s命令更换为root用户)
sudo apt-get install ubuntu-desktop
sudo apt-get install unity
sudo apt-get install compizconfig-settings-manager
亲测安装特别慢,耐心等待吧!
接着配置显示方式
export DISPLAY=localhost:0
ccsm










