How to reset editor for crontab in Linux Mint

Cron is a task scheduling daemon used in Linux Mint. As of this writing, Linux Mint 17.3 has it pre-installed. When the user needs to schedule a task, he must execute the following command:

sudo crontab -e

If you do this for the first time, you will be offered to select the default editor. If you made a wrong choice, here is how you can reset the editor app for crontab in Linux Mint.

To add a scheduled task with crontab, you need to do the following.

  1. Open your favorite terminal app. Any app is suitable.
  2. Type the following command:
    sudo crontab -e

    Enter your password to confirm the command.Linux Mint crontab command

    If you do this for the first time, you will be offered to select the default editor. nano will be selected by default.

  3. If you accidentally selected the wrong app, for example, you entered 3 instead of 2 in the editor app request, exit the currently opened editor app.
  4. Type the following command:
    rm ~/.selected_editor

    This will reset the app choice for the crontab -e command for your user account in Linux Mint.Linux Mint reset editor for crontab

The .selected_editor file located in your home directory contains the path to the editor's executable file which will be used for the crontab command. Once you delete it, you will get the prompt to select a new editor app the next time you run the crontab command.Linux Mint re-select editor for crontab

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!


Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

Leave a Reply

Your email address will not be published.

Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.