How to undo NetworkManager changes

kujiy asked:

I accidentally modified NetworkManager with the command.

nmcli con modify eno1 ipv4.dns-options 'single-request-reopen timeout:2 ndots:0'

I think the modification hasn’t been activated since I haven’t restarted the device.

I don’t know the previous value of the setting.

How can I undo the modification to the previous one?

My answer:


Set it to the empty string, which also happens to be the default.

# nmcli c m eno1 ipv4.dns-options ''

You will then see that the field has reverted to its default value.

# nmcli --fields ipv4.dns-options c s eno1
ipv4.dns-options:                       (default)

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.