How to change the Ali source in Ubuntu 20.04

How to change the Ali source in Ubuntu 20.04

Note that this article does not simply teach you how to change to the 20.04 source, but teaches you a method based on 20.04 to change the source.
When I wrote this article, 20.04 had not yet been officially released, but the source code was already available in the repository, so I wrote this article.

Please note: Ubuntu 20.04 was officially released on April 23.
Please note: Some software, such as ckermit, is not available in the repository yet. Please consider upgrading or replacing it yourself.

1 Back up the original source

cp -ra /etc/apt/sources.list /etc/apt/sources.list.bak

2 Find out the code name of Ubuntu, for example:

4.10Warty Warthog
5.04Hoary Hedgehog
5.10Breezy Badger

6.06 (LTS) Dapper Drake
6.10Edgy Eft (Irritable Water Lizard)
7.04Feisty Fawn
7.10Gutsy Gibbon

8.04 (LTS) Hardy Heron
8.10Intrepid Ibex (Intrepid Ibex)
9.04 Jaunty Jackalope
9.10Karmic Koala (Lucky Koala)

10.04 (LTS) Lucid Lynx
10.10Oneiric Ocelot (Fantasy Ocelot)
11.04Natty Narwhal
11.10Oneiric Ocelot

12.04 (LTS) Precise Pangolin
12.10Quantal Quetzal
13.04Raring Ringtail
13.10Saucy Salamander

14.04(LTS)Trusty Tahr (Trusty Tahr) (LTS)
14.10Utopic Unicorn
15.04Vivid Vervet (Lively Little Monkey)
15.10Wily Werewolf (Wily Werewolf)

16.04(LTS)Xenial Xerus (Hospitable African Ground Squirrel)
16.10Yakkety Yak
17.04Zesty Zapus
17.10Artful Aardvark

18.04 (LTS) Bionic Beaver
18.10Cosmic Cuttlefish
19.04Disco Dingo (Dancing Dog)
19.10 Eoan Ermine (White Ermine)

20.04 (LTS) Focal Fossa (Focal Fossa)

To know the code of the current system, you can use the following command:

lsb_release -a

3 Go to Alibaba Source to see if this source exists

http://archive.ubuntu.com/ubuntu/dists/


As you can see, the source of Ubuntu 20.04 (codenamed focal) is now available.

4 Then use the following template as a template and replace the 'TODO' with the above Codename

deb http://mirrors.aliyun.com/ubuntu/ TODO main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ TODO main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ TODO-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ TODO-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ TODO-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ TODO-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ TODO-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ TODO-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ TODO-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ TODO-backports main restricted universe multiverse

For example, after I changed the source of 20.04, it looked like this:

deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

Then paste it into /etc/apt/sources.list just now.

5 Update Cache and Upgrade

sudo apt-get update
sudo apt-get upgrade

This is the end of this article about how to change the Ali source for Ubuntu 20.04. For more information about how to change the Ali source for Ubuntu 20.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to change the domestic source of Ubuntu 20.04 apt
  • How to change apt-get source in Ubuntu 18.04
  • Detailed explanation of several domestic update sources for Ubuntu 16.04
  • How to change Alibaba source in Ubuntu 14.04 and Ubuntu 16.04
  • How to configure Ubuntu 17.04 to change the domestic source
  • Example of how to change the domestic source in Ubuntu 18.04
  • Detailed process of changing apt source to Alibaba Cloud source in Ubuntu 18.04

<<:  WeChat applet implements sorting function based on date and time

>>:  MySQL 5.7 generated column usage example analysis

Recommend

The perfect solution for forgetting the password in mysql8.0.19

Recommended reading: MySQL 8.0.19 supports accoun...

Sample code for implementing 3D rotation effect using pure CSS

Mainly use the preserve-3d and perspective proper...

Example code for implementing a QR code scanning box with CSS

We usually have a scanning box when we open the c...

How to clean up data in MySQL online database

Table of contents 01 Scenario Analysis 02 Operati...

Forever+nginx deployment method example of Node site

I recently bought the cheapest Tencent cloud serv...

Some references about colors in HTML

In HTML, colors are represented in two ways. One i...

How to bind domain name to nginx service

Configure multiple servers in nginx.conf: When pr...

Solution to Docker image downloading too slowly

Docker image download is stuck or too slow I sear...

What is BFC? How to clear floats using CSS pseudo elements

BFC Concept: The block formatting context is an i...

Docker installation and configuration command code examples

Docker installation Install dependency packages s...

Detailed explanation of pure SQL statement method based on JPQL

JPQL stands for Java Persistence Query Language. ...

HTML+CSS+JS sample code to imitate the brightness adjustment effect of win10

HTML+CSS+JS imitates win10 brightness adjustment ...

How to implement data persistence using the vuex third-party package

Purpose: Allow the state data managed in vuex to ...

Example code for implementing anti-shake in Vue

Anti-shake: Prevent repeated clicks from triggeri...