How to get rid of “nano not found” warnings, without installing nano?

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











up vote
26
down vote

favorite












Installed Debian Stretch (9.3). Installed Vim and removed Nano. Vim is selected as the default editor.



Every time I run crontab -e, I get these warnings:



root@franklin:~# crontab -e
no crontab for root - using an empty one
/usr/bin/sensible-editor: 25: /usr/bin/sensible-editor: /bin/nano: not found
/usr/bin/sensible-editor: 28: /usr/bin/sensible-editor: nano: not found
/usr/bin/sensible-editor: 31: /usr/bin/sensible-editor: nano-tiny: not found
No modification made


I've tried reconfiguring the sensible-utils package, but it gives no input (indicating success with whatever it's doing), but the warnings still appear.



root@franklin:~# dpkg-reconfigure sensible-utils
root@franklin:~#


Although these warnings don't prevent me from doing anything, I find them quite annoying. How can I get rid of them?







share|improve this question
























    up vote
    26
    down vote

    favorite












    Installed Debian Stretch (9.3). Installed Vim and removed Nano. Vim is selected as the default editor.



    Every time I run crontab -e, I get these warnings:



    root@franklin:~# crontab -e
    no crontab for root - using an empty one
    /usr/bin/sensible-editor: 25: /usr/bin/sensible-editor: /bin/nano: not found
    /usr/bin/sensible-editor: 28: /usr/bin/sensible-editor: nano: not found
    /usr/bin/sensible-editor: 31: /usr/bin/sensible-editor: nano-tiny: not found
    No modification made


    I've tried reconfiguring the sensible-utils package, but it gives no input (indicating success with whatever it's doing), but the warnings still appear.



    root@franklin:~# dpkg-reconfigure sensible-utils
    root@franklin:~#


    Although these warnings don't prevent me from doing anything, I find them quite annoying. How can I get rid of them?







    share|improve this question






















      up vote
      26
      down vote

      favorite









      up vote
      26
      down vote

      favorite











      Installed Debian Stretch (9.3). Installed Vim and removed Nano. Vim is selected as the default editor.



      Every time I run crontab -e, I get these warnings:



      root@franklin:~# crontab -e
      no crontab for root - using an empty one
      /usr/bin/sensible-editor: 25: /usr/bin/sensible-editor: /bin/nano: not found
      /usr/bin/sensible-editor: 28: /usr/bin/sensible-editor: nano: not found
      /usr/bin/sensible-editor: 31: /usr/bin/sensible-editor: nano-tiny: not found
      No modification made


      I've tried reconfiguring the sensible-utils package, but it gives no input (indicating success with whatever it's doing), but the warnings still appear.



      root@franklin:~# dpkg-reconfigure sensible-utils
      root@franklin:~#


      Although these warnings don't prevent me from doing anything, I find them quite annoying. How can I get rid of them?







      share|improve this question












      Installed Debian Stretch (9.3). Installed Vim and removed Nano. Vim is selected as the default editor.



      Every time I run crontab -e, I get these warnings:



      root@franklin:~# crontab -e
      no crontab for root - using an empty one
      /usr/bin/sensible-editor: 25: /usr/bin/sensible-editor: /bin/nano: not found
      /usr/bin/sensible-editor: 28: /usr/bin/sensible-editor: nano: not found
      /usr/bin/sensible-editor: 31: /usr/bin/sensible-editor: nano-tiny: not found
      No modification made


      I've tried reconfiguring the sensible-utils package, but it gives no input (indicating success with whatever it's doing), but the warnings still appear.



      root@franklin:~# dpkg-reconfigure sensible-utils
      root@franklin:~#


      Although these warnings don't prevent me from doing anything, I find them quite annoying. How can I get rid of them?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 13 '17 at 15:25









      Teekin

      600613




      600613




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          40
          down vote



          accepted










          I found my own answer and so I'm posting it here, in case it helps someone else.



          In the root user's home directory, /root, there was a file alled .selected_editor, which still retained this content:



          # Generated by /usr/bin/select-editor
          SELECTED_EDITOR="/bin/nano"


          The content suggests that the command select-editor is used to select a new editor, but at any rate, I removed the file (being in a bad mood and feeling the urge to obliterate something) and was then given the option of selecting the editor again when running crontab -e, at which point I selected vim.basic, and all was fine after that. The new content of the file reflects that selection now:



          # Generated by /usr/bin/select-editor
          SELECTED_EDITOR="/usr/bin/vim.basic"





          share|improve this answer
















          • 4




            Nice. So update-alternatives --config editor does not help here.
            – Christopher
            Dec 13 '17 at 15:42






          • 2




            Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
            – Charles Duffy
            Dec 13 '17 at 17:12







          • 4




            @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
            – ilkkachu
            Dec 13 '17 at 20:05






          • 1




            Uh, yeah.... gee thanks, pikachu.
            – Christopher
            Dec 14 '17 at 20:39

















          up vote
          6
          down vote













          The generic Linux way to set the default editor is to set VISUAL shell variable to the desired editor. For example in .bashrc add line like this:



          export VISUAL=/usr/bin/vi


          This will set every time you login in to the system vi as visual editor






          share|improve this answer
















          • 3




            This is Debian. It has the alternatives and the sensible- mechanisms as well.
            – JdeBP
            Dec 13 '17 at 15:57






          • 3




            @JdeBP, did I mention in the answer "generic"?
            – Romeo Ninov
            Dec 13 '17 at 16:01






          • 1




            This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
            – JdeBP
            Dec 13 '17 at 20:43







          • 3




            Another possibility is to set the EDITOR environment variable which is what I do.
            – Alex Vong
            Dec 14 '17 at 4:30


















          up vote
          2
          down vote













          Another neat trick is to do update-alternatives and pick your preferred editor. This not only gives you the privilege to pick one but also let you see what editors are on your system:



          update-alternatives --config editor


          Result:



          There are 3 choices for the alternative editor (providing /usr/bin/editor).

          Selection Path Priority Status
          ------------------------------------------------------------
          * 0 /bin/nano 40 auto mode
          1 /bin/nano 40 manual mode
          2 /usr/bin/vim.basic 30 manual mode
          3 /usr/bin/vim.tiny 10 manual mode

          Press enter to keep the current choice[*], or type selection number:


          Then simply type the number of your preferred editor and hit the return key.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            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: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f410668%2fhow-to-get-rid-of-nano-not-found-warnings-without-installing-nano%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            40
            down vote



            accepted










            I found my own answer and so I'm posting it here, in case it helps someone else.



            In the root user's home directory, /root, there was a file alled .selected_editor, which still retained this content:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/bin/nano"


            The content suggests that the command select-editor is used to select a new editor, but at any rate, I removed the file (being in a bad mood and feeling the urge to obliterate something) and was then given the option of selecting the editor again when running crontab -e, at which point I selected vim.basic, and all was fine after that. The new content of the file reflects that selection now:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/usr/bin/vim.basic"





            share|improve this answer
















            • 4




              Nice. So update-alternatives --config editor does not help here.
              – Christopher
              Dec 13 '17 at 15:42






            • 2




              Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
              – Charles Duffy
              Dec 13 '17 at 17:12







            • 4




              @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
              – ilkkachu
              Dec 13 '17 at 20:05






            • 1




              Uh, yeah.... gee thanks, pikachu.
              – Christopher
              Dec 14 '17 at 20:39














            up vote
            40
            down vote



            accepted










            I found my own answer and so I'm posting it here, in case it helps someone else.



            In the root user's home directory, /root, there was a file alled .selected_editor, which still retained this content:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/bin/nano"


            The content suggests that the command select-editor is used to select a new editor, but at any rate, I removed the file (being in a bad mood and feeling the urge to obliterate something) and was then given the option of selecting the editor again when running crontab -e, at which point I selected vim.basic, and all was fine after that. The new content of the file reflects that selection now:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/usr/bin/vim.basic"





            share|improve this answer
















            • 4




              Nice. So update-alternatives --config editor does not help here.
              – Christopher
              Dec 13 '17 at 15:42






            • 2




              Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
              – Charles Duffy
              Dec 13 '17 at 17:12







            • 4




              @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
              – ilkkachu
              Dec 13 '17 at 20:05






            • 1




              Uh, yeah.... gee thanks, pikachu.
              – Christopher
              Dec 14 '17 at 20:39












            up vote
            40
            down vote



            accepted







            up vote
            40
            down vote



            accepted






            I found my own answer and so I'm posting it here, in case it helps someone else.



            In the root user's home directory, /root, there was a file alled .selected_editor, which still retained this content:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/bin/nano"


            The content suggests that the command select-editor is used to select a new editor, but at any rate, I removed the file (being in a bad mood and feeling the urge to obliterate something) and was then given the option of selecting the editor again when running crontab -e, at which point I selected vim.basic, and all was fine after that. The new content of the file reflects that selection now:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/usr/bin/vim.basic"





            share|improve this answer












            I found my own answer and so I'm posting it here, in case it helps someone else.



            In the root user's home directory, /root, there was a file alled .selected_editor, which still retained this content:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/bin/nano"


            The content suggests that the command select-editor is used to select a new editor, but at any rate, I removed the file (being in a bad mood and feeling the urge to obliterate something) and was then given the option of selecting the editor again when running crontab -e, at which point I selected vim.basic, and all was fine after that. The new content of the file reflects that selection now:



            # Generated by /usr/bin/select-editor
            SELECTED_EDITOR="/usr/bin/vim.basic"






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 13 '17 at 15:31









            Teekin

            600613




            600613







            • 4




              Nice. So update-alternatives --config editor does not help here.
              – Christopher
              Dec 13 '17 at 15:42






            • 2




              Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
              – Charles Duffy
              Dec 13 '17 at 17:12







            • 4




              @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
              – ilkkachu
              Dec 13 '17 at 20:05






            • 1




              Uh, yeah.... gee thanks, pikachu.
              – Christopher
              Dec 14 '17 at 20:39












            • 4




              Nice. So update-alternatives --config editor does not help here.
              – Christopher
              Dec 13 '17 at 15:42






            • 2




              Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
              – Charles Duffy
              Dec 13 '17 at 17:12







            • 4




              @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
              – ilkkachu
              Dec 13 '17 at 20:05






            • 1




              Uh, yeah.... gee thanks, pikachu.
              – Christopher
              Dec 14 '17 at 20:39







            4




            4




            Nice. So update-alternatives --config editor does not help here.
            – Christopher
            Dec 13 '17 at 15:42




            Nice. So update-alternatives --config editor does not help here.
            – Christopher
            Dec 13 '17 at 15:42




            2




            2




            Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
            – Charles Duffy
            Dec 13 '17 at 17:12





            Interesting. Conventionally, the environment variable to control what visudo, git (when prompting for a commit message to be edited), mutt and other tools will use is just EDITOR (for barebones/baseline scenarios), or VISUAL (when curses is available).
            – Charles Duffy
            Dec 13 '17 at 17:12





            4




            4




            @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
            – ilkkachu
            Dec 13 '17 at 20:05




            @Christopher, alternatives is system-wide, ~/.selected-editor per-user.
            – ilkkachu
            Dec 13 '17 at 20:05




            1




            1




            Uh, yeah.... gee thanks, pikachu.
            – Christopher
            Dec 14 '17 at 20:39




            Uh, yeah.... gee thanks, pikachu.
            – Christopher
            Dec 14 '17 at 20:39












            up vote
            6
            down vote













            The generic Linux way to set the default editor is to set VISUAL shell variable to the desired editor. For example in .bashrc add line like this:



            export VISUAL=/usr/bin/vi


            This will set every time you login in to the system vi as visual editor






            share|improve this answer
















            • 3




              This is Debian. It has the alternatives and the sensible- mechanisms as well.
              – JdeBP
              Dec 13 '17 at 15:57






            • 3




              @JdeBP, did I mention in the answer "generic"?
              – Romeo Ninov
              Dec 13 '17 at 16:01






            • 1




              This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
              – JdeBP
              Dec 13 '17 at 20:43







            • 3




              Another possibility is to set the EDITOR environment variable which is what I do.
              – Alex Vong
              Dec 14 '17 at 4:30















            up vote
            6
            down vote













            The generic Linux way to set the default editor is to set VISUAL shell variable to the desired editor. For example in .bashrc add line like this:



            export VISUAL=/usr/bin/vi


            This will set every time you login in to the system vi as visual editor






            share|improve this answer
















            • 3




              This is Debian. It has the alternatives and the sensible- mechanisms as well.
              – JdeBP
              Dec 13 '17 at 15:57






            • 3




              @JdeBP, did I mention in the answer "generic"?
              – Romeo Ninov
              Dec 13 '17 at 16:01






            • 1




              This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
              – JdeBP
              Dec 13 '17 at 20:43







            • 3




              Another possibility is to set the EDITOR environment variable which is what I do.
              – Alex Vong
              Dec 14 '17 at 4:30













            up vote
            6
            down vote










            up vote
            6
            down vote









            The generic Linux way to set the default editor is to set VISUAL shell variable to the desired editor. For example in .bashrc add line like this:



            export VISUAL=/usr/bin/vi


            This will set every time you login in to the system vi as visual editor






            share|improve this answer












            The generic Linux way to set the default editor is to set VISUAL shell variable to the desired editor. For example in .bashrc add line like this:



            export VISUAL=/usr/bin/vi


            This will set every time you login in to the system vi as visual editor







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 13 '17 at 15:40









            Romeo Ninov

            4,36811625




            4,36811625







            • 3




              This is Debian. It has the alternatives and the sensible- mechanisms as well.
              – JdeBP
              Dec 13 '17 at 15:57






            • 3




              @JdeBP, did I mention in the answer "generic"?
              – Romeo Ninov
              Dec 13 '17 at 16:01






            • 1




              This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
              – JdeBP
              Dec 13 '17 at 20:43







            • 3




              Another possibility is to set the EDITOR environment variable which is what I do.
              – Alex Vong
              Dec 14 '17 at 4:30













            • 3




              This is Debian. It has the alternatives and the sensible- mechanisms as well.
              – JdeBP
              Dec 13 '17 at 15:57






            • 3




              @JdeBP, did I mention in the answer "generic"?
              – Romeo Ninov
              Dec 13 '17 at 16:01






            • 1




              This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
              – JdeBP
              Dec 13 '17 at 20:43







            • 3




              Another possibility is to set the EDITOR environment variable which is what I do.
              – Alex Vong
              Dec 14 '17 at 4:30








            3




            3




            This is Debian. It has the alternatives and the sensible- mechanisms as well.
            – JdeBP
            Dec 13 '17 at 15:57




            This is Debian. It has the alternatives and the sensible- mechanisms as well.
            – JdeBP
            Dec 13 '17 at 15:57




            3




            3




            @JdeBP, did I mention in the answer "generic"?
            – Romeo Ninov
            Dec 13 '17 at 16:01




            @JdeBP, did I mention in the answer "generic"?
            – Romeo Ninov
            Dec 13 '17 at 16:01




            1




            1




            This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
            – JdeBP
            Dec 13 '17 at 20:43





            This is not generic. This is Debian, and the question is about changing an existing setting in sensible-editor specifically.
            – JdeBP
            Dec 13 '17 at 20:43





            3




            3




            Another possibility is to set the EDITOR environment variable which is what I do.
            – Alex Vong
            Dec 14 '17 at 4:30





            Another possibility is to set the EDITOR environment variable which is what I do.
            – Alex Vong
            Dec 14 '17 at 4:30











            up vote
            2
            down vote













            Another neat trick is to do update-alternatives and pick your preferred editor. This not only gives you the privilege to pick one but also let you see what editors are on your system:



            update-alternatives --config editor


            Result:



            There are 3 choices for the alternative editor (providing /usr/bin/editor).

            Selection Path Priority Status
            ------------------------------------------------------------
            * 0 /bin/nano 40 auto mode
            1 /bin/nano 40 manual mode
            2 /usr/bin/vim.basic 30 manual mode
            3 /usr/bin/vim.tiny 10 manual mode

            Press enter to keep the current choice[*], or type selection number:


            Then simply type the number of your preferred editor and hit the return key.






            share|improve this answer
























              up vote
              2
              down vote













              Another neat trick is to do update-alternatives and pick your preferred editor. This not only gives you the privilege to pick one but also let you see what editors are on your system:



              update-alternatives --config editor


              Result:



              There are 3 choices for the alternative editor (providing /usr/bin/editor).

              Selection Path Priority Status
              ------------------------------------------------------------
              * 0 /bin/nano 40 auto mode
              1 /bin/nano 40 manual mode
              2 /usr/bin/vim.basic 30 manual mode
              3 /usr/bin/vim.tiny 10 manual mode

              Press enter to keep the current choice[*], or type selection number:


              Then simply type the number of your preferred editor and hit the return key.






              share|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                Another neat trick is to do update-alternatives and pick your preferred editor. This not only gives you the privilege to pick one but also let you see what editors are on your system:



                update-alternatives --config editor


                Result:



                There are 3 choices for the alternative editor (providing /usr/bin/editor).

                Selection Path Priority Status
                ------------------------------------------------------------
                * 0 /bin/nano 40 auto mode
                1 /bin/nano 40 manual mode
                2 /usr/bin/vim.basic 30 manual mode
                3 /usr/bin/vim.tiny 10 manual mode

                Press enter to keep the current choice[*], or type selection number:


                Then simply type the number of your preferred editor and hit the return key.






                share|improve this answer












                Another neat trick is to do update-alternatives and pick your preferred editor. This not only gives you the privilege to pick one but also let you see what editors are on your system:



                update-alternatives --config editor


                Result:



                There are 3 choices for the alternative editor (providing /usr/bin/editor).

                Selection Path Priority Status
                ------------------------------------------------------------
                * 0 /bin/nano 40 auto mode
                1 /bin/nano 40 manual mode
                2 /usr/bin/vim.basic 30 manual mode
                3 /usr/bin/vim.tiny 10 manual mode

                Press enter to keep the current choice[*], or type selection number:


                Then simply type the number of your preferred editor and hit the return key.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 17 '17 at 4:22









                George Udosen

                1,112318




                1,112318






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410668%2fhow-to-get-rid-of-nano-not-found-warnings-without-installing-nano%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay