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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
3
down vote

favorite












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 at 8:37















up vote
3
down vote

favorite












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 at 8:37













up vote
3
down vote

favorite









up vote
3
down vote

favorite











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 at 21:39









Zanna

48.3k13120229




48.3k13120229










asked Feb 1 at 8:27









Anesu Gerry Mangwiro Black Whi

162




162







  • 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 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 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 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 at 8:37











2 Answers
2






active

oldest

votes

















up vote
4
down vote













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 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





























    up vote
    0
    down vote













    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




















    • 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 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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    4
    down vote













    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 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


























      up vote
      4
      down vote













      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 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
























        up vote
        4
        down vote










        up vote
        4
        down vote









        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 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 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 Feb 1 at 21:42

























        answered Feb 1 at 8:38









        karel

        51.8k11110131




        51.8k11110131






















            up vote
            0
            down vote













            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




















            • 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 at 14:18















            up vote
            0
            down vote













            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




















            • 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 at 14:18













            up vote
            0
            down vote










            up vote
            0
            down vote









            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 at 10:41









            Badr Bellaj

            1012




            1012











            • 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 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 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 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 at 14:18


















             

            draft saved


            draft discarded















































             


            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













































































            Popular posts from this blog

            Which professions warranted travel in Medieval times?

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

            Trouble downloading packages list due to a “Hash sum mismatch” error