这是本文档旧的修订版!
Linux
设在中文环境
中文
locale
su -
dpkg-reconfigure locales
按空格选择
[*]zh_CN.utf-8 utf-8
tab切换ok
zh_CN.utf-8
cat /root/.profile
注释
LANG=C
LANGUAGE=C
设置user使用sudo
sudo系统提示user 不是 sudoers 文件。
su -
查看
cat /etc/sudoers
vi /etc/sudoers
user ALL=(ALL:ALL) ALL
:wq!
镜像源
设置源
在终端输入
vi /etc/apt/sources.list
添加镜像源,完成后执行更新
apt update
apt upgrade
阿里
deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib deb https://mirrors.aliyun.com/debian-security/ bullseye-security main deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib #deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib #deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib deb https://mirrors.aliyun.com/debian/ trixie main non-free non-free-firmware deb-src https://mirrors.aliyun.com/debian/ trixie main non-free non-free-firmware deb https://mirrors.aliyun.com/debian-security/ trixie-security main deb-src https://mirrors.aliyun.com/debian-security/ trixie-security main deb https://mirrors.aliyun.com/debian/ trixie-updates main non-free non-free-firmware deb-src https://mirrors.aliyun.com/debian/ trixie-updates main non-free non-free-firmware # 可选:backports(不建议日常使用) #deb https://mirrors.aliyun.com/debian/ trixie-backports main non-free
华为
deb https://mirrors.huaweicloud.com/debian/ bookworm main non-free-firmware deb https://mirrors.huaweicloud.com/debian-security/ bookworm main non-free-firmware apt-get install apt-transport-https ca-certificates apt-get update
火山
deb http://mirrors.ivolces.com/debian/ bookworm main non-free non-free-firmware contrib #deb-src http://mirrors.ivolces.com/debian/ bookworm main non-free non-free-firmware contrib deb http://mirrors.ivolces.com/debian-security/ bookworm-security main #deb-src http://mirrors.ivolces.com/debian-security/ bookworm-security main deb http://mirrors.ivolces.com/debian/ bookworm-updates main non-free non-free-firmware contrib #deb-src http://mirrors.ivolces.com/debian/ bookworm-updates main non-free non-free-firmware contrib deb http://mirrors.ivolces.com/debian/ bookworm-backports main non-free non-free-firmware contrib #deb-src http://mirrors.ivolces.com/debian/ bookworm-backports main non-free non-free-firmware contrib
清华
访问https://mirror.tuna.tsinghua.edu.cn/help/debian/
apt install apt-transport-https ca-certificates
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 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
中科大
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.hust.edu.cn/debian bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.hust.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb https://mirrors.hust.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.hust.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.hust.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.hust.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
中国科学技术
# 默认注释了源码仓库,如有需要可自行取消注释
deb http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
# backports 软件源,请按需启用
# deb http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
应用商店
echo "deb [trusted=yes] https://ci.deepin.com/repo/obs/linglong:/CI:/release/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/linglong.list sudo apt update sudo apt install linglong-builder linglong-box linglong-bin
打印机
安装cups打印机服务
sudo apt-get install cups cups-client
sudo apt update
访问https://packages.debian.org/bookworm/amd64/libcupsimage2/download下载
sudo apt --fix-broken install sudo dpkg -i libcupsimage2_2.4.2-3+deb12u8_amd64.deb apt install libcupsimage2
Wine
安装依赖
sudo apt install dirmngr ca-certificates curl software-properties-common apt-transport-https
添加32bit支持
dpkg –add-architecture i386
安装
wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/ bookworm main
apt update
apt install –install-recommends winehq-stable
sudo apt install winetricks
winetricks vcrun2022 # 安装 Visual C++ 运行库
winetricks allfonts corefonts cjkfonts # 安装常用字体,包括中文字体
winetricks d3dx9 d3dx10 # 安装 DirectX 提升兼容性和游戏性能
winetricks riched20 riched30 #渲染奇葩问题
浏览器
sudo apt install fonts-liberation
sudo dpkg -i microsoft-edge-stable_138.0.3351.65-1_amd64.deb