Updates Ubuntu Software Download (Mirror replace domestic Tsinghua address)

1. Go to the open-source software mirroring station Tsinghua looking for a mirror version of ubuntu

https://mirrors.tuna.tsinghua.edu.cn/

Here Insert Picture Description
Find ubuntu, click on the question mark . (Note here that clicking the question mark, click on the question mark!)

https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

After entering Choose your ubuntu version
Here Insert Picture Description
does not know his own version of ubuntu, open the terminal and type: CAT / etc / IssueHere Insert Picture Description
For example, I was Ubuntu12
After selecting the first page now retained to operate ubuntu

2. Obtain administrator privileges to perform the following actions

su root         输入密码即可
若是还没有编写root密码就执行: sudo passwd  命令,输入一般用户密码并设定 root 用户密码
再使用上面的命令获得管理员权限即可.

3. Install the vim editor

因为之后要编辑sources.list文档,所以现安装好vim
apt install vim

3. Back up the source address of the default ubuntu

cd /etc/apt
cp sources.list sources.list.backup

4. Empty sources.list

echo '' > sources.list

5. Replace the sources.list file

Go to browser the mirror just to get a copy of it
Here Insert Picture Description

vim sources.list    编辑文件,把刚刚复制的粘贴进去即可
点击esc输入:wq保存退出

6. Update the source server list

sudo apt-get update

If at this time the following problems:
 Solution one: Check whether there is a background program is updated, if you can turn off the update
 solution: enter: sudo rm / var / lib / apt / lists / lock command to
Here Insert Picture Description

We're done!
Here Insert Picture Description

Guess you like

Origin www.cnblogs.com/yue1234/p/12421555.html