WSL下的Ubuntu 18.04LTS配置软件源和系统更新

WSL下的Ubuntu 18.04LTS配置软件源和系统更新

设置系统语言为中文

# 安装中文支持
sudo apt-get install -y language-pack-zh-hans
# 设置默认语言
sudo update-locale LANG=zh_CN.UTF-8

分别执行完上面的命令,关闭窗口,然后重新启动Ubuntu即可切换为中文。

更换软件源

1. 切换root用户

sudo -i

2. 备份当前软件源

 mv /etc/apt/sources.list /etc/apt/sources.list.bak

3. 编辑软件源管理文件

vim /etc/apt/sources.list

下面是阿里云和网易云的镜像地址,任选其一粘贴至/etc/apt/sources.list保存退出即可

阿里云软件源:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

网易软件源:

deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

4.更新软件列表和系统软件包

sudo apt-get update&& apt-get upgrade

至此,软件源的配置结束,快下载个软件试试你的网速有没有飞起来吧
PS:配置LNMP的方案新手我推荐宝塔面板,包含可视化操作面板的服务器环境,对小白用户非常友好,官网:https://www.bt.cn/ ,也欢迎转至宝塔面板7.2.0,宝塔5.9.2安装学习版。

WSL下的Ubuntu 18.04LTS配置软件源和系统更新

上一篇:linux 别名


下一篇:linux下变成——操作系统——信号