nmcli tips
nmcli
is used to control NetworkManager from the command line. This can be very useful to troubleshoot and configure headless machines.
VM has no IP address §
Situation: A VM has a network adapter, but no IP address is shown when running ip a
.
To investigate, run nmcli d
(short for nmcli device
), which lists all devices:
The device in question, eno16777984
, is listed as “disconnected”.
Run nmcli con up eno16777984
to bring the connection up.
Then run nmcli d
again to check the device status:
The device is now connected. Running ip a
shows that an IP address has now been assigned!