0

Just wondering the above.

So far I've tried:

export EDITOR=$(which nano)
export SUDO_EDITOR=$(which nano)
export VISUAL=$(which nano)

in both ~/.bashrc and /root/.bashrc, as well as

Defaults        editor="/usr/bin/nano"

in /etc/sudoers and then logging out and back in again.

None of the above has worked. Any ideas?

1
  • Whose .bashrc? Yours or roots?
    – markgraf
    Jul 14 at 18:59
2

If you have export EDITOR=$(which nano) in your homes .bashrc, try sudo -E crontab -e.

You become root through sudo, so no need to specify the root-user for crontab. The -E preserves your users environment.

1
  • That worked, thanks!
    – jdrch
    Jul 15 at 0:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.