Skip to content

Instantly share code, notes, and snippets.

@alexisrolland
Created December 24, 2020 02:12
Show Gist options
  • Save alexisrolland/aff3c78d62badb8cd4aabc7039c2cec0 to your computer and use it in GitHub Desktop.
Save alexisrolland/aff3c78d62badb8cd4aabc7039c2cec0 to your computer and use it in GitHub Desktop.
Commands used to update the file /etc/apt/sources.list which contains the list of mirrors to download packages with apt command. Commands below were tested in a Docker container built with image ubuntu:18.04.
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" > /etc/apt/sources.list
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse" >> /etc/apt/sources.list
apt-get update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment