debian11 安装后必备配置
运行环境:PVE v7.2-11 CT容器
系统版本:Debian-11-standard_11.3-1_amd64.tar.zst
启动信息
Debian GNU/Linux 11 debian tty1
debian login: root
Password:
Linux debian 5.15.64-1-pve
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Nov 19 09:39:49 UTC 2022 on tty1
root@debian:~
版本信息
root@debian:~
root@debian:~
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@debian:~
root@debian:~
root@debian:~
11.3
root@debian:~
root@debian:~
Static hostname: debian
Icon name: computer-container
Chassis: container
Machine ID: 4241fde901b64f0d8731261862696790
Boot ID: 8f9c38c2abc64384b1f12efd72c9f299
Virtualization: lxc
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.15.64-1-pve
Architecture: x86-64
root@debian:~
root@debian:~
Linux debian 5.15.64-1-pve
root@debian:~
配置1:系统默认使用nano编辑器,也提供精简版的vim.tiny版,安装vim。
root@debian:~
root@debian:~
-bash: vim: command not found
root@debian:~
root@debian:~
vim: /usr/bin/vim.tiny /etc/vim /usr/share/vim /usr/share/man/man1/vim.1.gz
root@debian:~
root@debian:~
配置2:系统默认是不能以root账户SSH登录的,需要修改配置使能。
scilogyhunter@debian:~$ sudo vim /etc/ssh/ssh_config
scilogyhunter@debian:~$
scilogyhunter@debian:~$ sudo systemctl restart ssh
scilogyhunter@debian:~$
scilogyhunter@debian:~$ su root
Password:
root@debian:/home/scilogyhunter
root@debian:/home/scilogyhunter
配置3:安装sudo命令,创建管理员用户,后面都以此用户进行系统管理而不是root用户。
root@debian:~
root@debian:~
root@debian:~
Debian GNU/Linux 11 debian tty1
debian login: scilogyhunter
Password:
Linux debian 5.15.64-1-pve
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
scilogyhunter@debian:~$
配置4:使用VScode远程SSH登录,会自动安装vscode-server,以后无论是命令行还是文件编辑都可以直接在VScode中进行,比命令行下用vim/nano编辑高效的多。
配置5:为了提高软件下载速度,建议更新源为国内镜像,这里选用阿里的源。
先备份sources.list,然后拷贝到用户目录,用VScode进行编辑,最后再拷回去覆盖院配置。
scilogyhunter@debian:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.back
scilogyhunter@debian:~$ cp /etc/apt/sources.list /home/scilogyhunter/sources.list
scilogyhunter@debian:~$ sudo cp /home/scilogyhunter/sources.list /etc/apt/sources.list
配置6:更新系统
scilogyhunter@debian:~$ sudo apt update
scilogyhunter@debian:~$ sudo apt upgrade
配置5:开启常用指令别名和颜色显示
这个在对应用户目录下的.bashrc文件中其实已近存在,但是是注释状态,只要去掉注释即可。
该配置文件只有在用户登入时才执行,所以修改后需要程序登录一下。
scilogyhunter@debian:~$ ll
bash: ll: command not found
scilogyhunter@debian:~$ su scilogyhunter
Password:
scilogyhunter@debian:~$
scilogyhunter@debian:~$ ll
total 4
-rw-r--r-- 1 scilogyhunter scilogyhunter 652 Nov 21 12:44 sources.list
-rw-r--r-- 1 scilogyhunter scilogyhunter 0 Nov 19 14:22 text
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)