跳转到帖子
在手机APP中查看

一个更好的浏览方法。了解更多

PHP论坛人

主屏幕上的全屏APP,带有推送通知、徽章等。

在iOS和iPadOS上安装此APP
  1. 在Safari中轻敲分享图标
  2. 滚动菜单并轻敲添加到主屏幕
  3. 轻敲右上角的添加按钮。
在安卓上安装此APP
  1. 轻敲浏览器右上角的三个点菜单 (⋮) 。
  2. 轻敲添加到主屏幕安装APP
  3. 轻敲安装进行确认。

Debian 13更換套件來源 (APT源)

精选回复

 

-----------------------------------
Debian 13更換套件來源 (APT源)
-----------------------------------

Debian的套件來源 (又稱APT源) 設定檔,在Debian 13預設會使用新的DEB822格式,存放於 /etc/apt/sources.list.d/debian.sources

當然,系統也向下相容舊的單行格式,該格式的檔案位於 /etc/apt/sources.list


-----------------------
確認目前來源設定
-----------------------

列出所有APT來源檔
ls -la /etc/apt/sources.list /etc/apt/sources.list.d/


查看DEB822設定
cat /etc/apt/sources.list.d/debian.sources


查看舊格式
cat /etc/apt/sources.list





-----------------
編輯來源設定檔
-----------------

Debian 13推薦使用新的DEB822格式,這種格式更清晰易讀

根據你的需求選擇以下方法之一。所有操作需要root權限


----------------------------------------
方法 A:編輯新的DEB822格式 (推薦)
----------------------------------------

vi /etc/apt/sources.list.d/debian.sources

將內容替換為以下設定 (Debian 官方來源)

Types: deb
URIs: https://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg


ESC儲存並離開
:wq



DEB822欄位說明
欄位	用途
Types	來源類型 (通常為 deb)
URIs	伺服器網址
Suites	發行版本
Components	套件分類
Signed-By	GPG金鑰





-------------------------------
方法 B:編輯傳統的單行格式
-------------------------------

若你習慣舊有的設定方式,系統仍完全相容 

vi /etc/apt/sources.list

設定內容 (Debian 官方來源)

# Debian 主要套件庫
deb https://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware

# Debian 安全更新
deb https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware

# Debian 一般更新
deb https://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware



ESC儲存並離開
:wq




註:
以 # 開頭的行為註解,不會被執行

deb-src 為原始碼來源,一般使用者可保持註解以加快更新速度

若要改用其他鏡像站,只需將 https://deb.debian.org/debian/ 部分替換為對應的網址即可 


套件分類說明
分類	說明
main 符合自由軟體指導方針的官方支援軟體
contrib 依賴非自由軟體的自由軟體
non-free 非自由軟體
non-free-firmware 硬體驅動程式 (如Wi-Fi、顯示卡) 必備的非自由韌體




----------------------
更新與驗證
----------------------

修改完成後,請執行以下指令更新套件清單並升級已安裝套件:

更新套件清單
apt update


升級已安裝的套件
apt upgrade -y


清理舊檔,移除不需要的套件
apt clean

apt autoclean

apt autoremove -y


驗證來源是否正常,此指令會顯示目前使用的套件來源優先順序
apt-cache policy


若有核心更新或重大變更,建議重新啟動
reboot





----------
疑難排解
----------

apt update 出現GPG簽署錯誤

解決方法
apt-get install debian-archive-keyring

apt update



sources.list 與 sources.d 衝突

若兩者都存在相同來源,可能造成:重複套件列表、優先權混亂

建議:只保留一種格式

本帖最后于,由Jack编辑

创建帐户或登录后发表意见

帐户

导航

搜索

配置浏览器推送通知

Chrome (安卓)
  1. 轻敲地址栏旁的锁形图标。
  2. 轻敲权限 → 通知。
  3. 调整你的偏好。
Chrome (台式电脑)
  1. 点击地址栏中的挂锁图标。
  2. 选择网站设置。
  3. 找到通知选项并调整你的偏好。