Network Manager

sudo apt update
sudo apt-get install network-manager

Control over Network manager


sudo nano /etc/netplan/00-installer-config.yaml

on Ubuntu Server 24.04

sudo nano /etc/netplan/50-cloud-init.yaml

Add txt ...

#This is the network config written by 'subiquity'
#  ethernets:
#    enp3s0:
#      dhcp4: true
#    enp4s0:
#      dhcp4: true
#    enp5s0:
#      dhcp4: true
#    enp6s0:
#      dhcp4: true
#  version: 2
  version: 2
  renderer: NetworkManager

NetworkManager does not manage any interface defined in .......... by default. 

sudo nano /etc/network/interfaces

For example

allow-hotplug eth0
iface eth0 inet dhcp

Thereafter, to check whether the configuration provided is as per defined standards.

sudo netplan try

To apply the configuration

sudo netplan apply

Lastly, we need to restart NetworkManager service to reflect the changes.

sudo systemctl restart NetworkManager.service

User Interface for controlling NetworkManager



nmcli general
nmcli connection show
sudo nmcli connection add type ethernet ifname enp1s0
nmcli connection up ethernet-enp1s8
nmcli connection show --active
nmcli connection down ethernet-enp1s0
nmcli connection up ethernet-enp1s0
nmcli connection modify ethernet-enp1s0 ipv4.address
nmcli connection modify ethernet-enp1s0 ipv4.method manual
nmcli connection modify ethernet-enp1s0 ipv4.method auto
nmcli device status
nmcli device show enp1s0