How to add update source in linux

小老鼠
Release: 2023-12-08 09:47:50
Original
1669 people have browsed it

Add steps: 1. Open a terminal window; 2. Use a text editor (such as vi or nano) to open the /etc/apt/sources.list file and use "sudo vi /etc/apt/sources.list " command to open the file and add a new update source; 3. Save and close the file; 4. Use the "sudo apt-get update" command in the terminal window to update the update source list to add a new update source.

How to add update source in linux

To add an update source, you can follow these steps:

  • Open a terminal window.
  • Use a text editor (such as vi or nano) to open the /etc/apt/sources.list file. You can open the file using the following command:
    sudo vi /etc/apt/sources.list
    Copy after login
  • In the opened file you can add a new update source. Each update source should occupy one line and should begin with "deb" or "deb-src", followed by the URL of the update source. For example:
    deb http://archive.ubuntu.com/ubuntu xenial main restricted
    deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
    Copy after login
  • Save and close the file.
  • Use the following command in a terminal window to update your update source list:
    sudo apt-get update
    Copy after login
  • The new update source is added and you can use the apt-get command to install or update software Bag.

The above is the detailed content of How to add update source in linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!