Home > Article > System Tutorial > How to change Ubuntu's apt-get update source?
Manually modify Ubuntu's apt-get source
1. Use the ssh tool to connect to Ubuntu (I use xshell)
2. Type in the command line cd /etc/apt/
3. Back up the source.list file in this directory (you must have sudo permissions). Now there will be a source.list.bak document
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
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)
6. Finally execute apt-get update (because you just switched to the root user, you don’t need to add sudo before the command)
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!