虚拟机安装Debian11

HacLee,Debian

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.

Allow remote ssh connect

  1. 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
  2. Next, we need to install another tool, sudo, which allows other users to have root privileges.
    apt install sudo
  3. 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