Bootstrap

Ubuntu修改apt镜像源+安装GCC

Ubuntu 18.04修改apt镜像源

官方镜像源实在慢的可怜,,,只怪国内墙太高,挂梯子都过不去了
遂直接换个镜像源吧

  1. 找到 sources.list文件
    先备份一下,免得改崩
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  1. 修改可读权限
chmod 777 /etc/apt/sources.list
  1. 修改文件内容
vim /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.aliy
;