🐸 Debian安装后必备配置
1. 查看系统版本信息
1 | root@VM-16-16-debian:~# cat /etc/os-release |
1.1 安装vim编辑器
1 | apt install vim |
1.2 Root用户连接SSH
系统默认是不能使用Root用户去使用SSH连接到VPS的,我们需要修改配置。
1 | sudo vim /etc/ssh/ssh_config |
安装sudo命令,创建管理员用户,后面都以此用户进行系统管理而不是root用户。
1 | root@debian:~# useradd -m -s /bin/bash -G sudo test |
让我们创建的用户和root有同等的权限
1 | #1.添加用户,首先用 adduser 命令添加一个普通用户,命令如下: |
这样我们就不用去操作root用户了,可以直接操作我们和root用户有同等权限的用户。
1.3 为了提高软件下载速度,建立更换为国内镜像源
先备份sources.list,然后拷贝到用户目录,用编辑器进行编辑,最后再拷回去覆盖院配置。
1 | sudo cp /etc/apt/sources.list /etc/apt/sources.list.back |
我使用的是腾讯云的1
2
3
4
5
6deb http://mirrors.tencentyun.com/debian bookworm main contrib non-free non-free-firmware
#deb-src http://mirrors.tencentyun.com/debian bookworm main contrib non-free non-free-firmware
deb http://mirrors.tencentyun.com/debian bookworm-updates main contrib non-free non-free-firmware
#deb-src http://mirrors.tencentyun.com/debian bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.tencentyun.com/debian-security/ bookworm-security main contrib non-free-firmware
#deb-src http://mirrors.tencentyun.com/debian-security/ bookworm-security main contrib non-free-firmware