虚拟机安装Debian11
Quick Install
I prefer to choose the netinst.iso of Debian 11 because it has a smaller size and basic functionality. However, there are a few things to pay attention to during the installation process.
-
Scan extra installation media?
- no
- yes
when we choose no, it won't scan other package info and save our time
-
Using a network mirror?
- no
- yes
We hope to install the necessary packages as needed.
These two steps save us a lot of installation time.
Allow remote ssh connect
- First, log in using the root account and install openssh-server to allow SSH tools to connect remotely.
What we need to do is
apt install openssh-server
- Next, we need to install another tool, sudo, which allows other users to have root privileges.
apt install sudo
- Then, add the non-root user to the sudoers list to grant them root privileges
...
# User privilege specification
root ALL=(ALL:ALL) ALL
# Change your own non-root-user bellow
your-non-root-user ALL=(ALL:ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
...
Attention: The NOPASSWD setting, which means that the non-root user does not need to enter a password when temporarily using root privileges. This setting is only for convenience during testing. For a production environment, it is recommended to configure it as follows.
your-non-root-user ALL=(ALL:ALL) ALL