Armbian安装后更换国内源

文章目录

  • 简述
  • 操作
    • 查看版本【可略】
    • 常用的国内镜像源
    • 操作步骤

简述

Armbain默认使用的是国外的软件源,但是速度很慢,安装软件下载速度韩漫,所以我们需要更换为国内源

操作

查看版本【可略】

  • Armbian上查看系统版本
    cat /etc/armbian-release
    
  • 例如:
    root@armbian:~# cat /etc/armbian-release
    # PLEASE DO NOT EDIT THIS FILE
    BOARD=odroidn2
    BOARD_NAME="RK-Panther-X2"
    BOARDFAMILY=meson-g12b
    BUILD_REPOSITORY_URL=
    BUILD_REPOSITORY_COMMIT=
    VERSION=23.05.0-trunk
    LINUXFAMILY=meson64
    ARCH=arm64
    IMAGE_TYPE=stable
    BOARD_TYPE=conf
    INITRD_ARCH=arm64
    KERNEL_IMAGE_TYPE=Image
    FORCE_BOOTSCRIPT_UPDATE=yes
    VENDOR=Armbian
    REVISION=23.05.0-trunk
    BOOTSCRIPT_FORCE_UPDATE="yes"
    BOOTSCRIPT_DST="boot.cmd"
    BRANCH=current
    

常用的国内镜像源

  • 清华大学
  • 中科大
  • 阿里云
  • 163

操作步骤

  1. 打开 /etc/apt/sources.list 文件以编辑,将当前的软件源地址注释或备份,以便将来可以恢复到原始设置
sudo nano /etc/apt/sources.list
  1. 将以下内容【任选其一即可】添加到 sources.list 文件中:
    • 清华源
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bullseye-security main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bullseye-security main contrib non-free
    
    • 阿里云源
    deb http://mirrors.aliyun.com/debian/ bullseye main contrib non-free
    #deb-src http://mirrors.aliyun.com/debian/ bullseye main contrib non-free
    
    deb http://mirrors.aliyun.com/debian/ bullseye-updates main contrib non-free
    #deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main contrib non-free
    
    deb http://mirrors.aliyun.com/debian/ bullseye-backports main contrib non-free
    #deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main contrib non-free
    
    deb http://mirrors.aliyun.com/debian-security/ bullseye-security main contrib non-free
    #deb-src http://mirrors.aliyun.com/debian-security/ bullseye-security main contrib non-free
    
    
  2. 保存更改(使用 Ctrl + O,然后按 Enter 键),然后关闭文件(使用 Ctrl + X)
  3. 更新软件源列表,以便使用新的镜像源
    sudo apt update
    
  4. 然后会提示你,可升级的包如:
    4 packages can be upgraded. Run 'apt list --upgradable' to see them.
    
  5. 按照提示的命令进行升级即可【速度搜搜快】
    apt list --upgradable
    

你可能感兴趣的:(Armbian折腾记,linux,debian,服务器)