Why is nmcli not configuring device?

Solution 1:

This is because since Ubuntu 18.04, the network configuration file has changed from interfaces to netplan, and you need to use apt install network-manager again modify /etc/netplan/00-installer-config.yamllike this

network:
  renderer: NetworkManager

This allows the network configuration to point to NetworkManager,then use netplan apply load this file. you can use nmcli device status check if the configuration is in effect.gook luck!

Solution 2:

This worked for me:

https://serverfault.com/questions/880950/network-issue-ifup-says-unknown-interface

iface enp0s3 inet dhcp

Followed by:

/etc/init.d/networking start