linux---ubuntu method to change software source

    In the process of using the Ubuntu operating system, you will generally encounter the problem of changing the software source. How to change the software source?

1. Graphical configuration-system configuration (recommended)

①Select-Show Application

074969b33a22c2c43f59ec1c124ae41a.png

②Select-Software and Updates

99ec6567466d02548ffe41575605a6ac.png

③Choose the appropriate software source

9ced62f95f1ce8e19bc02dc98037601f.png

The software and update interface can also be called up through the terminal command - software-properties-gtk. Enter this command in the terminal and wait for a while, the software and update interface will pop up.

software-properties-gtk

5d10fd7155c8e6426c5a000414e29766.png

2. Manual modification

The sources.list file can be modified manually. How to find this file? This file can be found using the find command. View the content of the file and you can see the information, bionic represents the version name.

63460c6ed23c1c52067c4e738ee8da50.png

The version name can be viewed through the command lsb_release -c.

lsb_release -c

5dbdddffd87a71a769c25ece8b2c40ef.png

You can also refer to the following to know the system name of ubuntu

8679b9f7406517698697cdb285b49b15.png

When editing the sources.list file, please note that the version code of the software source must be consistent with the version code of Ubuntu. (Can be edited using vim commands).

    Check whether the system version exists through the following URL. If it exists, it means it is still under maintenance.

http://archive.ubuntu.com/ubuntu/dists/

    If the corresponding version of your system cannot be found in the above URL, it means that it is beyond the scope of maintenance, that is, the version is too low. Although the expired version data source cannot be maintained, it has not been deleted. You can query the system version at the following URL

http://old-releases.ubuntu.com/ubuntu/dists/

In other words, sources that are not updated can be replaced by old-releases. That is, replace the URL in the sources.list list.

    The software source you find online must be consistent with your own version code , otherwise various error prompts given by apt will appear .

Welcome to follow the public account: Embedded Learning and Practice

reference:

https://blog.csdn.net/apple_51720004/article/details/125105945
https://blog.csdn.net/qq_45991026/article/details/119489948

Guess you like

Origin blog.csdn.net/weixin_46158019/article/details/131821027