Debian 初始化笔记

Debian 初始化笔记

vate_room 30 2024-07-10

Debian 初始化笔记

1. 查看IP地址

ip addr

2. 更换apt源

vim /etc/apt/sources.list
https://mirror.tuna.tsinghua.edu.cn/help/debian/
清华大学开源软件镜像站

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

3.添加中文语言环境

#1、安装locales
apt update
apt install locales
#2、设置语言选项
dpkg-reconfigure locales

#3.选择如下:
zh_CN.UTF-8 UTF-8
en_US.UTF-8 UTF-8
#4.选择 en_US.UTF-8
#并Teb切换 到左下角的确认按钮点回车

#安装中文字体
apt install fonts-wqy-microhei fonts-wqy-zenhei xfonts-wqy

4. 安装工具包

apt install net-tools vim wget curl
apt install sudo
# 安装ll包,仅root有效(也可以直接别名)
apt install coreutils
#其他工具
apt install lrzsz unzip wget curl screen uuid-runtime git
apt dist-upgrade -y

# 编译相关(慎重)
apt install linux-image-amd64 linux-headers-amd64
apt install make