WSL配置流程 Ubuntu20.04 (个人用)

1. 换源(清华源)

有关代码: vim /etc/apt/sources.list

清华园镜像站
Ubuntu 20.04LTS

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

2. 更新包

有关代码:

sudo apt update
sudo apt upgrade

3. 安装apt-fast

有关代码:
添加 apt-fast 的仓库:sudo add-apt-repository ppa:apt-fast/stable
安装 apt-get :sudo apt-get install apt-fast
有关选择:

  1. apt
  2. 线程数 1-16
  3. yes

4. 安装xfce4

https://blog.csdn.net/weixin_45579994/article/details/112381567这部分可参考其他教程
有关代码:
apt-fast安装xfce4:sudo apt-fast install xfce4
有关选择:gdm3
有关配置:
vim ~/.bashrc

最后加上以下两行
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
export LIBGL_ALWAYS_INDIRECT=1

5.系统设置中文

有关代码:
dpkg-reconfigure locales
有关选择:多选个zh_CN UTF8,确认,选zh_CN UTF8
安装语言包:sudo apt-fast install fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp

6.安装谷歌输入法

有关代码:
sudo apt-get install fcitx
安装中文语言包
sudo apt-get install language-pack-zh-hans
安装谷歌输入法
sudo apt-get install fcitx-googlepinyin

7.重启WSL

你可能感兴趣的:(ubuntu,linux)