admin 管理员组

文章数量: 887021

文章目录

  • 简述
  • 说明
    • 切换清华官方Armbian源
  • 操作
    • 查看版本【可略】
    • 常用的国内镜像源
    • 操作步骤

简述

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

说明

  • debian和Armbian的国内源是否通用的?
  • Debian和Armbian的国内源并不一定通用。虽然它们都是基于Debian的操作系统,但Armbian是专门针对ARM架构的嵌入式设备开发的,因此可能会有特定的源地址和镜像。

切换清华官方Armbian源

  • 帮助文档地址
  1. 运行 armbian-config -> Personal -> Mirrors -> 选择镜像站
  2. 编辑 /etc/apt/sources.list.d/armbian.list,将 http://apt.armbian 替换为以下链接,然后执行 ```apt update``。
https://mirrors.tuna.tsinghua.edu/armbian

这可以由以下命令完成

sed -i.bak 's#http://apt.armbian#https://mirrors.tuna.tsinghua.edu/armbian#g' /etc/apt/sources.list.d/armbian.list
apt update

操作

查看版本【可略】

  • 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 文件中:
    • 针对armbian的源,可以试试
    deb http://mirrors.tuna.tsinghua.edu/armbian/ buster main buster-utils buster-desktop
    
    • 使用debian的源也可以,如果出现问题,请切换到合适的armbian源
    • 清华源
    deb https://mirrors.tuna.tsinghua.edu/debian/ bullseye main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu/debian/ bullseye main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu/debian/ bullseye-updates main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu/debian/ bullseye-updates main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu/debian/ bullseye-backports main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu/debian/ bullseye-backports main contrib non-free
    
    deb https://mirrors.tuna.tsinghua.edu/debian-security/ bullseye-security main contrib non-free
    #deb-src https://mirrors.tuna.tsinghua.edu/debian-security/ bullseye-security main contrib non-free
    
    • 阿里云源
    deb http://mirrors.aliyun/debian/ bullseye main contrib non-free
    #deb-src http://mirrors.aliyun/debian/ bullseye main contrib non-free
    
    deb http://mirrors.aliyun/debian/ bullseye-updates main contrib non-free
    #deb-src http://mirrors.aliyun/debian/ bullseye-updates main contrib non-free
    
    deb http://mirrors.aliyun/debian/ bullseye-backports main contrib non-free
    #deb-src http://mirrors.aliyun/debian/ bullseye-backports main contrib non-free
    
    deb http://mirrors.aliyun/debian-security/ bullseye-security main contrib non-free
    #deb-src http://mirrors.aliyun/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
    
    sudo apt upgrade
    

本文标签: 国内 Armbian