检查网络
使用 ip a
指令查看网卡是否分配到 IP,若无,可在 /etc/network/interfaces
中添加下面配置(ens3
换成自己的网卡)
allow-hotplug ens3
iface ens3 inet dhcp
使用下面指令或重启生效
systemctl restart networking
设置镜像及更新系统
echo 'deb http://mirror.nju.edu.cn/debian/ bullseye main contrib non-free
deb http://mirror.nju.edu.cn/debian/ bullseye-updates main contrib non-free
deb http://mirror.nju.edu.cn/debian/ bullseye-backports main contrib non-free
deb http://mirror.nju.edu.cn/debian-security/ bullseye-security main contrib non-free' | \
tee /etc/apt/sources.list > /dev/null
apt update && apt full-upgrade
tty 菱形字问题
tty 不支持中文字体,设置语言为英文就可以解决
修改下列文件(@后面为文件名)
@ /ect/locale.gen
- # en_US.UTF-8 UTF-8
+ en_US.UTF-8 UTF-8
运行 /usr/sbin/locale-gen
@ /etc/default/locale
+ LANG="en_US.UTF-8"
+ LANGUAGE="en_US:en"
重启
安装 sudo
apt install sudo
@ /etc/sudoers
+ Defaults env_reset,pwfeedback
+ %sudo ALL=(ALL) ALL
# nego 替换为自己的用户
/usr/sbin/usermod -aG sudo nego
注销后重新登录生效
安装 ssh 服务
apt install openssh-client openssh-server
注:默认会自动启动。