network connection using nmcli

Problem

There is no network connection and device is not managed

1
2
3
4
$ nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet unmanaged --
lo loopback unmanaged --

image-20220401011509900

solution

1
sudo nmcli networking on

Then, eth0 is connected

1
2
3
4
$ nmcli device status
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Ethernet connection 1
lo loopback unmanaged --

image-20220401011543866