这里以Debian12为例

修改国内源

1
sed -i 's@//.*debian.org@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list

配置网络

vim /etc/network/interfaces

固定ip配置

1
2
3
4
5
6
7
8
auto enp0s3
iface enp0s3 inet static
address 192.168.1.240/24
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8
# 其中 network\broadcast 可以省略不写

DHCP配置

1
iface enp0s3 inet dhcp

重启网络服务

1
sudo systemctl restart networking.service