Skip to content

Instantly share code, notes, and snippets.

@vadirajks
Forked from wsvn53/ubuntu-aliyun-mirrors.sh
Created March 20, 2023 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vadirajks/4485b7733eb8c2f1a53df0f563f1e534 to your computer and use it in GitHub Desktop.
Save vadirajks/4485b7733eb8c2f1a53df0f563f1e534 to your computer and use it in GitHub Desktop.
Change Ubuntu source to aliyun mirrors
#!/bin/bash
cat << EOF > /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
EOF
apt-get update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment