3

I have just installed Ubuntu 18.04 LTS from mini.iso using Ethernet/cable.

Then I have installed MATE desktop to it by sudo apt-get install ubuntu-mate-desktop^.

But the Network Manager tray icon/nm-applet says that Ehernet Networkdevice not managed:

What is the simplest method to setup the system to use NetworkManager back?


Note: please do not close this as duplicate - I need complete reproducible solution in one place.

N0rbert
  • 99,918

1 Answers1

5

To transform the system to normal MATE one should:

Remove systemd-networkd renderer:

sudo rm -v /etc/netplan/01-netcfg.yaml
sudo rm -v /etc/netplan/50-cloud-init.yaml

Restore Network Manager renderer:

cat <<EOF | sudo tee /etc/netplan/01-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
EOF

Apply netplan configuration with:

sudo netplan apply

Restart NetworkManager

sudo service network-manager restart
sudo service NetworkManager restart

Optionally restore contents of /etc/network/interfaces

cat <<EOF | sudo tee /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
EOF

Note: this method is also applicable to Ubuntu MATE 20.04 LTS, 21.04 and 21.10.

N0rbert
  • 99,918
mikewhatever
  • 32,638
  • 1
    Thank you! I have edited the great answer to get all pieces into it. For now it is really reproducible. I appreciate the first clue about /etc/netplan/01-network-manager-all.yaml. Manually compared the contents of /etc folders and discovered the same. – N0rbert Jul 08 '20 at 21:38
  • Please do not recommend disabling the networkd service. This is not necessary, and diverges from the normal state of an installed system. – slangasek Jul 09 '20 at 02:53
  • @slangasek thanks for the edit. For now I know more about netplan than before :) – N0rbert Jul 09 '20 at 07:18
  • This works very well indeed, thanks for the edit. – mikewhatever Sep 19 '20 at 22:31
  • @N0rbert, can this also be applied on systems created from the Ubuntu Live Server iso files? – sudodus Oct 02 '21 at 19:48
  • 1
    @sudodus I'm not sure. If you have time please try on VM. – N0rbert Oct 02 '21 at 19:50
  • 1
    @N0rbert, It works with a minor fix :-) See this link: https://askubuntu.com/questions/1367302/how-to-make-a-portable-ubuntu-server/1367303#1367303 – sudodus Oct 04 '21 at 10:21
  • @sudodus, great. Bookmarked. – N0rbert Oct 04 '21 at 20:36