Home > System Tutorial > LINUX > How to change Ubuntu's apt-get update source?

How to change Ubuntu's apt-get update source?

WBOY
Release: 2024-01-05 15:40:27
forward
990 people have browsed it

Manually modify Ubuntu's apt-get source

1. Use the ssh tool to connect to Ubuntu (I use xshell)

How to change Ubuntus apt-get update source?

2. Type in the command line cd /etc/apt/

How to change Ubuntus apt-get update source?

3. Back up the source.list file in this directory (you must have sudo permissions). Now there will be a source.list.bak document

How to change Ubuntus apt-get update source?

4. Clear the contents of the source.list file (note: it cannot be restored after clearing, so you need to perform the previous step to back up the file in advance). At this time, use sudo It prompts that the permissions are insufficient, switch directly to the root user to execute this command

How to change Ubuntus apt-get update source?

5. Use vim to open source.list, press the i key to enter the edit mode and paste the source address to be modified, and then press escEnter command mode, type: wqSave and exit (if you don’t know how to operate vim, you can first download how to use vim on Baidu)

How to change Ubuntus apt-get update source?

6. Finally execute apt-get update (because you just switched to the root user, you don’t need to add sudo before the command)

How to change Ubuntus apt-get update source?

related suggestion:

How to customize touchpad gestures in Ubuntu16.04 system?

How to set the default startup sequence of Ubuntu multiple systems in dual systems?

How to check the ubuntu version number? Tutorial on ubuntu checking system digits

The above is the detailed content of How to change Ubuntu's apt-get update source?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template