Example of how to change the domestic source in Ubuntu 18.04

Example of how to change the domestic source in Ubuntu 18.04

Ubuntu's own source is from China, so the download speed is relatively slow. Unlike CentOS, it does not select mirror sites during yum installation.

So I chose to change to a domestic source.

The following content is integrated from the Internet

Back up /etc/apt/sources.list file
mv /etc/apt/sources.list /etc/apt/sourses.list.backup

Create a new /etc/apt/sources.list file and add the following content

#163 source 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

After the changes are complete, execute the following command

# apt update
# apt upgrade

Some other apt commands

sudo apt-get update Update sourcesudo apt-get install package Install packagesudo apt-get remove package Delete packagesudo apt-cache search package Search for software packagesudo apt-cache show package Get relevant information of the package, such as description, size, version, etc.sudo apt-get install package --reinstall Reinstall packagesudo apt-get -f install Repair installationsudo apt-get remove package --purge Remove package, including configuration files, etc.sudo apt-get build-dep package Install related compilation environmentsudo apt-get upgrade Update installed packagessudo apt-get dist-upgrade Upgrade systemsudo apt-cache depends package Find out which packages the package depends onsudo apt-cache rdepends package View which packages the package depends onsudo apt-get source package Download the source code of the packagesudo apt-get clean && sudo apt-get autoclean Clean up useless packagessudo apt-get check Check for damaged dependencies

Several other domestic sources:

#中科大源deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

#Aliyun source deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

#清华源deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

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
  • How to change the Ali source in Ubuntu 20.04
  • Detailed process of changing apt source to Alibaba Cloud source in Ubuntu 18.04

<<:  Navicat for MySql Visual Import CSV File

>>:  element-ui Mark the coordinate points after uploading the picture

Recommend

How to use mixins in Vue

Table of contents Preface How to use Summarize Pr...

What should I do if I want to cancel an incorrect MySQL command?

I typed a wrong mysql command and want to cancel ...

Using react-beautiful-dnd to implement drag and drop between lists

Table of contents Why choose react-beautiful-dnd ...

How to use provide to implement state management in Vue3

Table of contents Preface How to implement Vuex f...

Comprehensive website assessment solution

<br />Sometimes you may be asked questions l...

How to restore docker container data

The project test environment database data is los...

HTML adaptive table method

<body style="scroll:no"> <tabl...

How to query a record in Mysql in which page of paging

Preface In practice, we may encounter such a prob...

Detailed explanation of common usage methods of weixin-js-sdk in vue

Link: https://qydev.weixin.qq.com/wiki/index.php?...

The benefits of div+css and web standard pages

The div element is used to provide structure and b...

How to quickly query 10 million records in Mysql

Table of contents Normal paging query How to opti...

Docker meets Intellij IDEA, Java development improves productivity tenfold

Table of contents 1. Preparation before developme...

Several methods to clear floating (recommended)

1. Add an empty element of the same type, and the...

Example tutorial on using the sum function in MySQL

Introduction Today I will share the use of the su...

Explain how to analyze SQL efficiency

The Explain command is the first recommended comm...