No such file or directory when trying to create a file with nano












3















I am trying to create a new file:



nano/etc/apt/apt.conf.d/02proxy


When upgrading from 14.04 to 16.04, but I'm getting the error:



No such file or directory









share|improve this question




















  • 6





    Have you tried to run nano/etc/apt/apt.conf.d/02proxy literally? Try it with a space after the command name: nano /etc/apt/apt.conf.d/02proxy. You’ll need root permissions for that.

    – Melebius
    Feb 1 '18 at 8:37


















3















I am trying to create a new file:



nano/etc/apt/apt.conf.d/02proxy


When upgrading from 14.04 to 16.04, but I'm getting the error:



No such file or directory









share|improve this question




















  • 6





    Have you tried to run nano/etc/apt/apt.conf.d/02proxy literally? Try it with a space after the command name: nano /etc/apt/apt.conf.d/02proxy. You’ll need root permissions for that.

    – Melebius
    Feb 1 '18 at 8:37
















3












3








3








I am trying to create a new file:



nano/etc/apt/apt.conf.d/02proxy


When upgrading from 14.04 to 16.04, but I'm getting the error:



No such file or directory









share|improve this question
















I am trying to create a new file:



nano/etc/apt/apt.conf.d/02proxy


When upgrading from 14.04 to 16.04, but I'm getting the error:



No such file or directory






command-line nano






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 1 '18 at 21:39









Zanna

50.5k13133241




50.5k13133241










asked Feb 1 '18 at 8:27









Anesu Gerry Mangwiro Black WhiAnesu Gerry Mangwiro Black Whi

1612




1612








  • 6





    Have you tried to run nano/etc/apt/apt.conf.d/02proxy literally? Try it with a space after the command name: nano /etc/apt/apt.conf.d/02proxy. You’ll need root permissions for that.

    – Melebius
    Feb 1 '18 at 8:37
















  • 6





    Have you tried to run nano/etc/apt/apt.conf.d/02proxy literally? Try it with a space after the command name: nano /etc/apt/apt.conf.d/02proxy. You’ll need root permissions for that.

    – Melebius
    Feb 1 '18 at 8:37










6




6





Have you tried to run nano/etc/apt/apt.conf.d/02proxy literally? Try it with a space after the command name: nano /etc/apt/apt.conf.d/02proxy. You’ll need root permissions for that.

– Melebius
Feb 1 '18 at 8:37







Have you tried to run nano/etc/apt/apt.conf.d/02proxy literally? Try it with a space after the command name: nano /etc/apt/apt.conf.d/02proxy. You’ll need root permissions for that.

– Melebius
Feb 1 '18 at 8:37












2 Answers
2






active

oldest

votes


















4














It seems like there is a typo in your question because there would normally be a blank space between nano and /etc/apt/apt.conf.d/... To create a new file named 02proxy in the /etc/apt/apt.conf.d directory (which normally already exists) open the terminal and type:



sudo touch /etc/apt/apt.conf.d/02proxy  


To open the 02proxy file for editing in nano text editor:



sudo nano /etc/apt/apt.conf.d/02proxy  


Nano text editor keyboard shortcuts
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

































    0














    this behavior happen if the target directory doesn't exist. you have therefore to create the parent directory



    mkdir my_dir


    then use nano.



    nano my_file


    CTRL x=>y






    share|improve this answer



















    • 1





      Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

      – PerlDuck
      Jul 29 '18 at 14:18













    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%2f1002003%2fno-such-file-or-directory-when-trying-to-create-a-file-with-nano%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









    4














    It seems like there is a typo in your question because there would normally be a blank space between nano and /etc/apt/apt.conf.d/... To create a new file named 02proxy in the /etc/apt/apt.conf.d directory (which normally already exists) open the terminal and type:



    sudo touch /etc/apt/apt.conf.d/02proxy  


    To open the 02proxy file for editing in nano text editor:



    sudo nano /etc/apt/apt.conf.d/02proxy  


    Nano text editor keyboard shortcuts
    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






























      4














      It seems like there is a typo in your question because there would normally be a blank space between nano and /etc/apt/apt.conf.d/... To create a new file named 02proxy in the /etc/apt/apt.conf.d directory (which normally already exists) open the terminal and type:



      sudo touch /etc/apt/apt.conf.d/02proxy  


      To open the 02proxy file for editing in nano text editor:



      sudo nano /etc/apt/apt.conf.d/02proxy  


      Nano text editor keyboard shortcuts
      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




























        4












        4








        4







        It seems like there is a typo in your question because there would normally be a blank space between nano and /etc/apt/apt.conf.d/... To create a new file named 02proxy in the /etc/apt/apt.conf.d directory (which normally already exists) open the terminal and type:



        sudo touch /etc/apt/apt.conf.d/02proxy  


        To open the 02proxy file for editing in nano text editor:



        sudo nano /etc/apt/apt.conf.d/02proxy  


        Nano text editor keyboard shortcuts
        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















        It seems like there is a typo in your question because there would normally be a blank space between nano and /etc/apt/apt.conf.d/... To create a new file named 02proxy in the /etc/apt/apt.conf.d directory (which normally already exists) open the terminal and type:



        sudo touch /etc/apt/apt.conf.d/02proxy  


        To open the 02proxy file for editing in nano text editor:



        sudo nano /etc/apt/apt.conf.d/02proxy  


        Nano text editor keyboard shortcuts
        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 4 at 10:54

























        answered Feb 1 '18 at 8:38









        karelkarel

        58.2k12128146




        58.2k12128146

























            0














            this behavior happen if the target directory doesn't exist. you have therefore to create the parent directory



            mkdir my_dir


            then use nano.



            nano my_file


            CTRL x=>y






            share|improve this answer



















            • 1





              Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

              – PerlDuck
              Jul 29 '18 at 14:18


















            0














            this behavior happen if the target directory doesn't exist. you have therefore to create the parent directory



            mkdir my_dir


            then use nano.



            nano my_file


            CTRL x=>y






            share|improve this answer



















            • 1





              Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

              – PerlDuck
              Jul 29 '18 at 14:18
















            0












            0








            0







            this behavior happen if the target directory doesn't exist. you have therefore to create the parent directory



            mkdir my_dir


            then use nano.



            nano my_file


            CTRL x=>y






            share|improve this answer













            this behavior happen if the target directory doesn't exist. you have therefore to create the parent directory



            mkdir my_dir


            then use nano.



            nano my_file


            CTRL x=>y







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 29 '18 at 10:41









            Badr BellajBadr Bellaj

            1012




            1012








            • 1





              Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

              – PerlDuck
              Jul 29 '18 at 14:18
















            • 1





              Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

              – PerlDuck
              Jul 29 '18 at 14:18










            1




            1





            Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

            – PerlDuck
            Jul 29 '18 at 14:18







            Creating a directory won't help if you don't put a space between the command (nano) and the file it applies to (/etc/apt/apt.conf.d/02proxy). The OP basically issued nanomy_file instead of nano my_file.

            – PerlDuck
            Jul 29 '18 at 14:18




















            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%2f1002003%2fno-such-file-or-directory-when-trying-to-create-a-file-with-nano%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

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei