码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2020-05-02 18:45:09      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:文件   cal   命令   nic   security   utf-8   管理   执行   oca   

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配置软件源和系统更新

标签:文件   cal   命令   nic   security   utf-8   管理   执行   oca   

原文地址:https://www.cnblogs.com/yingbin/p/12818746.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!