How can I edit a .conf file owned by root?












2















I'm trying to create an exception file to disable my ethernet as I think it's responsible for my 350s+ boot times, please see section of dmasg below :-



[ 3.750961] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[ 364.079424] ADDRCONF(NETDEV_UP): eth0: link is not ready



I'm following this answer Disable Ethernet permanently to speed up boot time and I've created the file but I can't save the edited version, the permissions tab tells me it's owned by root.



Any help is most appreciated. I'm a proper linux newbie, trying to get it to work on this laptop is my first foray into Ubuntu. I read messing with the root 'account' is not something for people who don't know what they're doing (i.e. me!). Please be gentle :-)










share|improve this question





























    2















    I'm trying to create an exception file to disable my ethernet as I think it's responsible for my 350s+ boot times, please see section of dmasg below :-



    [ 3.750961] sd 6:0:0:0: [sdb] Attached SCSI removable disk
    [ 364.079424] ADDRCONF(NETDEV_UP): eth0: link is not ready



    I'm following this answer Disable Ethernet permanently to speed up boot time and I've created the file but I can't save the edited version, the permissions tab tells me it's owned by root.



    Any help is most appreciated. I'm a proper linux newbie, trying to get it to work on this laptop is my first foray into Ubuntu. I read messing with the root 'account' is not something for people who don't know what they're doing (i.e. me!). Please be gentle :-)










    share|improve this question



























      2












      2








      2


      1






      I'm trying to create an exception file to disable my ethernet as I think it's responsible for my 350s+ boot times, please see section of dmasg below :-



      [ 3.750961] sd 6:0:0:0: [sdb] Attached SCSI removable disk
      [ 364.079424] ADDRCONF(NETDEV_UP): eth0: link is not ready



      I'm following this answer Disable Ethernet permanently to speed up boot time and I've created the file but I can't save the edited version, the permissions tab tells me it's owned by root.



      Any help is most appreciated. I'm a proper linux newbie, trying to get it to work on this laptop is my first foray into Ubuntu. I read messing with the root 'account' is not something for people who don't know what they're doing (i.e. me!). Please be gentle :-)










      share|improve this question
















      I'm trying to create an exception file to disable my ethernet as I think it's responsible for my 350s+ boot times, please see section of dmasg below :-



      [ 3.750961] sd 6:0:0:0: [sdb] Attached SCSI removable disk
      [ 364.079424] ADDRCONF(NETDEV_UP): eth0: link is not ready



      I'm following this answer Disable Ethernet permanently to speed up boot time and I've created the file but I can't save the edited version, the permissions tab tells me it's owned by root.



      Any help is most appreciated. I'm a proper linux newbie, trying to get it to work on this laptop is my first foray into Ubuntu. I read messing with the root 'account' is not something for people who don't know what they're doing (i.e. me!). Please be gentle :-)







      boot root ethernet






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 13 '17 at 12:23









      Community

      1




      1










      asked Sep 6 '12 at 20:15









      Alastair DoubellAlastair Doubell

      133




      133






















          2 Answers
          2






          active

          oldest

          votes


















          7














          You need to open the terminal (ALT+CTRL+T) then enter:



          gksu gedit /path/to/file.conf



          Enter your password, then edit the file and save.






          share|improve this answer


























          • In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

            – Steve
            Sep 6 '12 at 20:23








          • 3





            Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

            – hexafraction
            Sep 6 '12 at 20:34








          • 2





            What is the difference between gksudo nautilus and sudo nautilus

            – Uri Herrera
            Sep 6 '12 at 20:35



















          2














          A more general solution that also works in 18.04 and later in which gksu has been removed from the repositories, virtual consoles (tty) and on headless Ubuntu Server operating systems is to use Ubuntu's built-in default text editor for editing files from the terminal.



          sudoedit /path/to/file.conf


          This is logically equivalent to writing the same command the long way:



          sudo nano /path/to/file.conf


          The instructions for using nano text editor are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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',
            autoActivateHeartbeat: false,
            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%2faskubuntu.com%2fquestions%2f184878%2fhow-can-i-edit-a-conf-file-owned-by-root%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









            7














            You need to open the terminal (ALT+CTRL+T) then enter:



            gksu gedit /path/to/file.conf



            Enter your password, then edit the file and save.






            share|improve this answer


























            • In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

              – Steve
              Sep 6 '12 at 20:23








            • 3





              Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

              – hexafraction
              Sep 6 '12 at 20:34








            • 2





              What is the difference between gksudo nautilus and sudo nautilus

              – Uri Herrera
              Sep 6 '12 at 20:35
















            7














            You need to open the terminal (ALT+CTRL+T) then enter:



            gksu gedit /path/to/file.conf



            Enter your password, then edit the file and save.






            share|improve this answer


























            • In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

              – Steve
              Sep 6 '12 at 20:23








            • 3





              Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

              – hexafraction
              Sep 6 '12 at 20:34








            • 2





              What is the difference between gksudo nautilus and sudo nautilus

              – Uri Herrera
              Sep 6 '12 at 20:35














            7












            7








            7







            You need to open the terminal (ALT+CTRL+T) then enter:



            gksu gedit /path/to/file.conf



            Enter your password, then edit the file and save.






            share|improve this answer















            You need to open the terminal (ALT+CTRL+T) then enter:



            gksu gedit /path/to/file.conf



            Enter your password, then edit the file and save.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Sep 6 '12 at 20:20









            Uri Herrera

            10.4k1574130




            10.4k1574130










            answered Sep 6 '12 at 20:19









            SteveSteve

            4501415




            4501415













            • In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

              – Steve
              Sep 6 '12 at 20:23








            • 3





              Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

              – hexafraction
              Sep 6 '12 at 20:34








            • 2





              What is the difference between gksudo nautilus and sudo nautilus

              – Uri Herrera
              Sep 6 '12 at 20:35



















            • In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

              – Steve
              Sep 6 '12 at 20:23








            • 3





              Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

              – hexafraction
              Sep 6 '12 at 20:34








            • 2





              What is the difference between gksudo nautilus and sudo nautilus

              – Uri Herrera
              Sep 6 '12 at 20:35

















            In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

            – Steve
            Sep 6 '12 at 20:23







            In reply to edit: "Never use sudo with GUI software" I never knew about that as it always worked fine for me, could you do me a favor and explain why?

            – Steve
            Sep 6 '12 at 20:23






            3




            3





            Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

            – hexafraction
            Sep 6 '12 at 20:34







            Actually, it can cause extraneous files to be left. However, you can use nano if you know how.

            – hexafraction
            Sep 6 '12 at 20:34






            2




            2





            What is the difference between gksudo nautilus and sudo nautilus

            – Uri Herrera
            Sep 6 '12 at 20:35





            What is the difference between gksudo nautilus and sudo nautilus

            – Uri Herrera
            Sep 6 '12 at 20:35













            2














            A more general solution that also works in 18.04 and later in which gksu has been removed from the repositories, virtual consoles (tty) and on headless Ubuntu Server operating systems is to use Ubuntu's built-in default text editor for editing files from the terminal.



            sudoedit /path/to/file.conf


            This is logically equivalent to writing the same command the long way:



            sudo nano /path/to/file.conf


            The instructions for using nano text editor are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.






            share|improve this answer






























              2














              A more general solution that also works in 18.04 and later in which gksu has been removed from the repositories, virtual consoles (tty) and on headless Ubuntu Server operating systems is to use Ubuntu's built-in default text editor for editing files from the terminal.



              sudoedit /path/to/file.conf


              This is logically equivalent to writing the same command the long way:



              sudo nano /path/to/file.conf


              The instructions for using nano text editor are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.






              share|improve this answer




























                2












                2








                2







                A more general solution that also works in 18.04 and later in which gksu has been removed from the repositories, virtual consoles (tty) and on headless Ubuntu Server operating systems is to use Ubuntu's built-in default text editor for editing files from the terminal.



                sudoedit /path/to/file.conf


                This is logically equivalent to writing the same command the long way:



                sudo nano /path/to/file.conf


                The instructions for using nano text editor are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.






                share|improve this answer















                A more general solution that also works in 18.04 and later in which gksu has been removed from the repositories, virtual consoles (tty) and on headless Ubuntu Server operating systems is to use Ubuntu's built-in default text editor for editing files from the terminal.



                sudoedit /path/to/file.conf


                This is logically equivalent to writing the same command the long way:



                sudo nano /path/to/file.conf


                The instructions for using nano text editor are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 23 at 18:52

























                answered Oct 29 '16 at 5:54









                karelkarel

                58.5k13128147




                58.5k13128147






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f184878%2fhow-can-i-edit-a-conf-file-owned-by-root%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

                    How did Captain America manage to do this?

                    迪纳利

                    南乌拉尔铁路局