Debian系统配置

本文最后更新于 2026年5月26日 下午

更换源镜像

DEB822 格式
nano /etc/apt/sources.list.d/debian.sources

  1. Debian 13 清华源
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 软件更新
Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/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://mirrors.tuna.tsinghua.edu.cn/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
```

2. Debian 13 官方源

```shell
# 官方主仓与更新
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://deb.debian.org/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

中文语言环境

  1. 查看系统环境
    locale
  2. 生成中文语言环境
    locale-gen zh_CN.UTF-8
  3. 配置系统语言
    dpkg-reconfigure locales
  4. 更改默认环境变量
    source /etc/default/locale
  5. 再次检查语言环境
    locale

apt代理

nano /etc/apt/apt.conf.d/99proxy

1
2
Acquire::http::Proxy "http://127.0.0.1:10809";
Acquire::https::Proxy "http://127.0.0.1:10809";

网络配置

  • 查看网络接口
    ip addr
  • 编辑接口配置
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # DHCP自动获取
    allow-hotplug ens192
    iface ens192 inet dhcp
    # 静态IP地址
    allow-hotplug eno1
    iface eno1 inet static
    address 172.16.31.180/24
    gateway 172.16.31.254
    dns-nameservers 223.5.5.5

Debian系统配置
http://example.com/2025/08/04/Debian系统配置/
作者
秋雨夜眠
发布于
2025年8月4日
更新于
2026年5月26日
许可协议