Linux: Any distro-independent way to change and persist IP settings?











up vote
1
down vote

favorite
1












Are there any distribution-independent mechanisms for tasks like assigning static IP addresses, adding or deleting routes, etc and, then, also be able to persist the changes so made?



AFAIK, each Linux distro (Fedora, Ubuntu, etc) keeps its network settings in different file/dir structures, with maybe even different properties inside. While one can accomplish many things via commands like ifconfig, ip, route, etc from command-line I don't know how to persist/save their changes.










share|improve this question


























    up vote
    1
    down vote

    favorite
    1












    Are there any distribution-independent mechanisms for tasks like assigning static IP addresses, adding or deleting routes, etc and, then, also be able to persist the changes so made?



    AFAIK, each Linux distro (Fedora, Ubuntu, etc) keeps its network settings in different file/dir structures, with maybe even different properties inside. While one can accomplish many things via commands like ifconfig, ip, route, etc from command-line I don't know how to persist/save their changes.










    share|improve this question
























      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      Are there any distribution-independent mechanisms for tasks like assigning static IP addresses, adding or deleting routes, etc and, then, also be able to persist the changes so made?



      AFAIK, each Linux distro (Fedora, Ubuntu, etc) keeps its network settings in different file/dir structures, with maybe even different properties inside. While one can accomplish many things via commands like ifconfig, ip, route, etc from command-line I don't know how to persist/save their changes.










      share|improve this question













      Are there any distribution-independent mechanisms for tasks like assigning static IP addresses, adding or deleting routes, etc and, then, also be able to persist the changes so made?



      AFAIK, each Linux distro (Fedora, Ubuntu, etc) keeps its network settings in different file/dir structures, with maybe even different properties inside. While one can accomplish many things via commands like ifconfig, ip, route, etc from command-line I don't know how to persist/save their changes.







      linux ip routing ifconfig






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 25 '13 at 4:57









      Harry

      3741723




      3741723






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Perhaps the most direct way would be to put your configuration in a bash script, then run the script at login.



          How you have the script run will be distro-dependent but the script itself can be used on any Linux distro.






          share|improve this answer





















          • Don't know why I couldn't think of that! +1.
            – Harry
            May 26 '13 at 2:47


















          up vote
          2
          down vote













          The netcf library is intended to provide API to configure network interfaces in a distribution-independent way, while still using the network configuration system provided by the distribution. Currently the upstream version of this library has backends for Red Hat, SUSE and Debian network configuration systems; there is also a Windows backend.



          In addition to the C API, a command-line tool (ncftool) is available.






          share|improve this answer























          • I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
            – Harry
            May 26 '13 at 2:45












          • Link is dead :( That sounded like an interesting program too.
            – YetAnotherRandomUser
            Dec 1 at 1:02










          • @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
            – Sergey Vlasov
            Dec 1 at 14:00











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f599739%2flinux-any-distro-independent-way-to-change-and-persist-ip-settings%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Perhaps the most direct way would be to put your configuration in a bash script, then run the script at login.



          How you have the script run will be distro-dependent but the script itself can be used on any Linux distro.






          share|improve this answer





















          • Don't know why I couldn't think of that! +1.
            – Harry
            May 26 '13 at 2:47















          up vote
          1
          down vote



          accepted










          Perhaps the most direct way would be to put your configuration in a bash script, then run the script at login.



          How you have the script run will be distro-dependent but the script itself can be used on any Linux distro.






          share|improve this answer





















          • Don't know why I couldn't think of that! +1.
            – Harry
            May 26 '13 at 2:47













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Perhaps the most direct way would be to put your configuration in a bash script, then run the script at login.



          How you have the script run will be distro-dependent but the script itself can be used on any Linux distro.






          share|improve this answer












          Perhaps the most direct way would be to put your configuration in a bash script, then run the script at login.



          How you have the script run will be distro-dependent but the script itself can be used on any Linux distro.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 25 '13 at 19:56









          Turbo Turtle

          261




          261












          • Don't know why I couldn't think of that! +1.
            – Harry
            May 26 '13 at 2:47


















          • Don't know why I couldn't think of that! +1.
            – Harry
            May 26 '13 at 2:47
















          Don't know why I couldn't think of that! +1.
          – Harry
          May 26 '13 at 2:47




          Don't know why I couldn't think of that! +1.
          – Harry
          May 26 '13 at 2:47












          up vote
          2
          down vote













          The netcf library is intended to provide API to configure network interfaces in a distribution-independent way, while still using the network configuration system provided by the distribution. Currently the upstream version of this library has backends for Red Hat, SUSE and Debian network configuration systems; there is also a Windows backend.



          In addition to the C API, a command-line tool (ncftool) is available.






          share|improve this answer























          • I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
            – Harry
            May 26 '13 at 2:45












          • Link is dead :( That sounded like an interesting program too.
            – YetAnotherRandomUser
            Dec 1 at 1:02










          • @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
            – Sergey Vlasov
            Dec 1 at 14:00















          up vote
          2
          down vote













          The netcf library is intended to provide API to configure network interfaces in a distribution-independent way, while still using the network configuration system provided by the distribution. Currently the upstream version of this library has backends for Red Hat, SUSE and Debian network configuration systems; there is also a Windows backend.



          In addition to the C API, a command-line tool (ncftool) is available.






          share|improve this answer























          • I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
            – Harry
            May 26 '13 at 2:45












          • Link is dead :( That sounded like an interesting program too.
            – YetAnotherRandomUser
            Dec 1 at 1:02










          • @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
            – Sergey Vlasov
            Dec 1 at 14:00













          up vote
          2
          down vote










          up vote
          2
          down vote









          The netcf library is intended to provide API to configure network interfaces in a distribution-independent way, while still using the network configuration system provided by the distribution. Currently the upstream version of this library has backends for Red Hat, SUSE and Debian network configuration systems; there is also a Windows backend.



          In addition to the C API, a command-line tool (ncftool) is available.






          share|improve this answer














          The netcf library is intended to provide API to configure network interfaces in a distribution-independent way, while still using the network configuration system provided by the distribution. Currently the upstream version of this library has backends for Red Hat, SUSE and Debian network configuration systems; there is also a Windows backend.



          In addition to the C API, a command-line tool (ncftool) is available.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 1 at 13:56

























          answered May 25 '13 at 20:18









          Sergey Vlasov

          2,46811113




          2,46811113












          • I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
            – Harry
            May 26 '13 at 2:45












          • Link is dead :( That sounded like an interesting program too.
            – YetAnotherRandomUser
            Dec 1 at 1:02










          • @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
            – Sergey Vlasov
            Dec 1 at 14:00


















          • I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
            – Harry
            May 26 '13 at 2:45












          • Link is dead :( That sounded like an interesting program too.
            – YetAnotherRandomUser
            Dec 1 at 1:02










          • @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
            – Sergey Vlasov
            Dec 1 at 14:00
















          I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
          – Harry
          May 26 '13 at 2:45






          I jumped at the existence of such a tool. However, when I issue ncftool list --all on Ubuntu 13.04, it is reporting only lo whereas ifconfig reports lo, eth0, and wlan0. So, not sure if there will other gotchas as well as I try to use this tool. Also, why don't distro- leads get together and make it available as a standard package and encourage its use?
          – Harry
          May 26 '13 at 2:45














          Link is dead :( That sounded like an interesting program too.
          – YetAnotherRandomUser
          Dec 1 at 1:02




          Link is dead :( That sounded like an interesting program too.
          – YetAnotherRandomUser
          Dec 1 at 1:02












          @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
          – Sergey Vlasov
          Dec 1 at 14:00




          @YetAnotherRandomUser Updated the link; there is still some activity in the git repo, but the last release was made on 2015-04-08.
          – Sergey Vlasov
          Dec 1 at 14:00


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f599739%2flinux-any-distro-independent-way-to-change-and-persist-ip-settings%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

           ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕