Change the source of ubuntu apt, accelerate the download of Linux mirror website, accelerate the download of vim, and quickly install pip (full teaching version)

foreword

There should be many new Linux scholars like me who are not familiar with the basic syntax of Linux and encounter many problems when configuring the environment. For example, when downloading vim and other programs, if you use the officially configured apt source, the download speed is really fast unacceptable. Then we can actually replace the apt source and pip source with a domestic mirror website, so that the download speed will be the same as usual~ Take the mirror image of Tsinghua University as an example~

apt change source

The first step is to switch to super user mode.
In the second step, enter the following command to enter the sources.list file.

sudo gedit /etc/apt/sources.list

The third step is to go to the open source website of Tsinghua Mirror.com , select your ubuntu version, for example, mine is 20.04, and then copy the content of the text box. As shown below.
insert image description here
Step 4: After copying the content of deb..., replace all the sources.list file with the content just copied, and save it.
Step five, update apt using the command below.

sudo apt-get update

Finally, update the application using the command below.

sudo apt-get uograde

vim download

After updating the apt source, you can quickly download vim directly using the following command.

sudo apt install vim

test-vim

vim test.txt

install pip

sudo apt-get install -y python3-pip

Check pip version

pip3 -V

pip change source

Commonly used domestic mirror nets

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

阿里云 http://mirrors.aliyun.com/pypi/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

豆瓣:http://pypi.douban.com/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

pip temporary source change

sudo pip install [需安装的库] -i [镜像源url]

write at the end

This article is a summary of personal study. If it is not correct, please correct it, thank you very much!
At the same time, I also hope that everyone will support, like and follow~

Guess you like

Origin blog.csdn.net/charenCsdn/article/details/114977990