I need to change regularly between DHCP and static IP. I usually do so by editing the file /etc/network/interfaces. Editing this is tiresome, and I want to automate so that I can do it command line.

One solution that would work for me is to have two different interfaces files, (interfaces-A) and (interfaces-B), which I then load into the network manager. The problem is I do not how to do so.

So the question is, what is the simplest to change IP settings between static and DHCP through terminal? (possibly through loading two different network-interface files)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.