📌  相关文章
📜  apt sources.list amd64 only - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:59:21.841000             🧑  作者: Mango

APT Sources List AMD64 Only - Shell-Bash

Are you searching for a way to optimize your APT sources list for your AMD64 architecture? Look no further! In this guide, we will show you how to set up an APT sources list that is optimized for the AMD64 architecture.

Prerequisites

Before we begin, make sure you have the following:

  • A Linux distribution that is compatible with APT
  • Root access to your system
  • Basic knowledge of using the terminal
Step 1: Backup your current sources list

It's always a good idea to backup your current sources list before you start making any changes. Run the following command to create a backup of your current sources list:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
Step 2: Edit the sources list file

Open the sources list file for editing using your favorite text editor. In this example, we will use nano:

sudo nano /etc/apt/sources.list

In the text editor, you should see the list of repositories for your system. Comment out any lines that are not AMD64 specific by adding a "#" at the beginning of the line. For example:

# deb http://archive.ubuntu.com/ubuntu/ focal main restricted
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted
# deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
...

Save and close the file by pressing "Ctrl-X", then "Y", and finally "Enter".

Step 3: Update your system

Now that your sources list is updated, run the following command to update your system:

sudo apt update && sudo apt upgrade
Conclusion

Congratulations! You have successfully optimized your APT sources list for AMD64 architecture. Enjoy the improved performance and stability of your system.