Is there a command or shell script for converting a network script /etc/sysconfig/network-scripts/ifcfg-XXX to /etc/NetworkManager/system-connections/XXX.nmconnection config file?

I am currently using the ifcfg-rh plugin and it works fine, but I want to have all interface configuration at one place. I think I could rewrite it manually for one or two interfaces, but I have to do it on several servers.

2 Answers 2


There isn't a straightforward simple way to do this. There might never be as converting between different configurations is fraught with error.

That said if the keyfile plugin is listed first before the ifcfg-rh plugin (check NetworkManager --print-config), then cloning the old connection profile (nmcli con clone oldprofile newprofile) will create the new cloned profile in the keyfile format. You could then switch/up to the new one.


Recent versions of Fedora / RHEL support nmcli conn migrate. In older versions, clone the connection and remove the old one.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .