When you download a Debian "netinst" ISO and use it to construct a system, you reach an installer screen with the title "Software selection". By default, that screen enables the desktop environment and offers you a choice of windowing interfaces.
If you leave the desktop environment enabled then both Network Manager and the Avahi daemon (multicast DNS) are installed and configured, and the system will boot into the desktop windowing environment.
However, if you disable the desktop environment in the "Software selection" screen then the system will boot to the command-line console and neither Network Manager nor the Avahi daemon will have been installed.
It is not immediately clear why electing not to install a windowing environment should also affect data-communications features. It just does.
There are many reasons to steer clear of a windowing environment. Depending on the deployment, multicast DNS may or may not be useful. But Network Manager is a fairly good thing to have on any Debian system and these instructions explain how to get it running.
I tested these instructions on a Debian Bookworm 12.5.0 guest running on Proxmox-VE. At the "Software selection" screen, I:
- Disabled the desktop environment; and
- Enabled SSH.
Assume the following:
- The host name is "debian".
- The user name is "user".
- The IP address is 192.168.132.235.
-
In the Proxmox-VE GUI, use the Summary view to discover the IP address of the guest. An alternative is to login at the console and run:
$ hostname -I
-
Ensure SSH has no memory of that IP address:
$ ssh-keygen -R 192.168.132.235
This is a protective command. It guards against a nasty-sounding warning about an adversary-in-the-middle (AITM aka MITM) attack. You should ignore any errors.
-
Connect to the host:
$ ssh [email protected]
You should expect to encounter the Trust On First Use (TOFU) pattern (the first line of the message is, "The authenticity of [this] host can't be established"). Answer "yes" and enter the user's password.
-
Install required components:
$ sudo apt update $ sudo apt install -y network-manager avahi-daemon
You can omit
avahi-daemon
if you don't need multicast DNS. -
Verify the components just installed are now active:
$ systemctl is-active NetworkManager.service $ systemctl is-active avahi-daemon
Skip the second command if you did not install
avahi-daemon
. -
List the available network interfaces:
$ ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether bc:24:11:b4:25:c8 brd ff:ff:ff:ff:ff:ff altname enp0s18
-
Ask Network Manager what it knows about network connections:
$ nmcli conn show NAME UUID TYPE DEVICE lo b1ac2883-da07-45eb-a2e3-e04cf3379baf loopback lo
-
The reason why
ens18
doesn't appear in thenmcli
output is because that interface has been configured in/etc/network/interfaces
. That needs to be fixed:$ sudo sed -i.bak -e '/ens18/ s/^/#/' /etc/network/interfaces
Notes:
- The
-e '/ens18/ s/^/#/'
rule inserts a#
at the start of any line containingens18
. - Add additional
-e
patterns ifip link show
shows multiple interfaces (other thanlo
).
- The
-
Restart NetworkManager:
$ sudo systemctl restart NetworkManager.service
-
Check the result:
$ nmcli conn show NAME UUID TYPE DEVICE ens18 ebc05113-7710-411e-bc12-8f324324506c ethernet ens18 lo b1ac2883-da07-45eb-a2e3-e04cf3379baf loopback lo Wired connection 1 ac8407a3-f661-3e72-8c37-800c33712f5c ethernet --
-
The
ens18
interface is known to NetworkManager but it is in a kind of limbo state. Fix that with a reboot:$ sudo reboot
-
Reconnect (this time using the mDNS name):
$ ssh-keygen -R debian.local $ ssh [email protected]
Expect the TOFU pattern, respond "yes" and supply the password.
If you decided not to install the Avahi daemon then stick with the IP address form:
$ ssh [email protected]
but keep in mind that the IP address may have changed during the reboot so you may need to rediscover it and use
ssh-keygen -R
to avoid AITM warnings. -
Check the result:
$ nmcli conn show NAME UUID TYPE DEVICE Wired connection 1 ac8407a3-f661-3e72-8c37-800c33712f5c ethernet ens18 lo 300aa1ff-be57-42f2-8ffd-a6da7f535701 loopback lo
Now Network Manager is responsible for the ens18
interface and the system is running like a bought one.