初学Ubuntu:windows的linux子系统图形化界面配置及中文设置(适用于Ubuntu)

1、打开控制面板— 程序— 启用或关闭 Windows 功能:



2、勾选适用于 Linux 的 Windows 子系统并点击确定;

3、进入 Windows 10 设置— 更新与安全— 针对开发人员— 勾选开发人员模式并重启设备



4、Microsoft Store中搜索Ubuntu(我只测试Ubuntu,如果有人爱研究也可以尝试其他系统,如openSUSE,Debian,kali Ubuntu),在应用页安装好Ubuntu,过程很简单,就跟安装软件一样。(这里我已经安装了,按钮是启动,没有安装的朋友是获取安装按钮。)



5、在左下角的Cortana中搜索Ubuntu,点击进入,看到的界面就如同我们在Ubuntu下的终端界面。(恭喜你,安装成功,接下来就是图形化配置过程了)


6、在终端界面键入以下操作

初次使用需要修改源文件,先进行备份

cp  /etc/apt/sources.list  /etc/apt/sources.list.bak

使用vi编辑器,创建新的源文件

vi  /etc/apt/sources.list

选择一个源,将源代码复制进去

#国内源

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

##測試版源

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

# 源碼

deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

##測試版源

deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse

# Canonical 合作夥伴和附加

deb http://archive.canonical.com/ubuntu/ xenial partner

deb http://extras.ubuntu.com/ubuntu/ xenial main
# 阿里源

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties

deb http://archive.canonical.com/ubuntu xenial partner

deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

更新源(如果创建新的源文件,此步骤为不可或缺的步骤,以后能不能下载文件,就靠这个了

sudo apt-get update

安装 xorg

sudo apt-get install xorg

安装xfce4

sudo apt-get install xfce4

安装xrdp

sudo apt-get install xrdp

配置xrdp(配置端口)

sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini

xsession中写入xfce4-session

sudo echo xfce4-session >~/.xsession

重启xrdp服务

sudo service xrdp restart

如果有防火墙,允许即可

Cortana中搜索远程桌面连接,点击进入,输入本机IP本地回环地址127.0.0.1,可用来测试:端口3390或者3389,以及子系统用户名

登陆成功,显示Ubuntu的图形界面。

每次远程连接之前都要在终端中启动xrdp,并且窗口不能关闭。

sudo service xrdp start

中文支持,建议使用英文版,还能提高英语水平

如果是刚安装好的系统,先更新一下软件源和软件包更新源就不再多说了,上文已经详细叙述

更新软件包:

sudo apt upgrade -y

安装中文语言包:

sudo apt install -y language-pack-zh-hans language-pack-zh-hans-base

设置本地化环境变量:

echo "LANG=zh_CN.UTF-8" >> ~/.profile

重新打开 Ubuntu,完成!

并不是所有命令都支持中文,要看软件是否支持。

猜你喜欢

转载自blog.csdn.net/qq_15260769/article/details/80422981