Changing default crontab editor

I would like to use nano when I type crontab -e in the terminal. How can I do this? I am totally new to opensuse. Thanks!!

Assuming you already have ‘nano’ installed, you just need to export an
EDITOR environment variable to be whatever:


export EDITOR=$(which nano)

Try out ‘crontab -e’ and make sure it’s what you want.

Now that it’s working, put that line in your ~/.bashrc file so that the
change is permanent for your user specifically, then logout/login or
restart your terminal to apply the change:


echo "export EDITOR=\$(which nano)" >> ~/.bashrc

You could also start a new ‘bash’ session from wherever you are to see the
change (‘bash’ followed by [Enter]).


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

Assuming you already have ‘nano’ installed, you just need to export an
EDITOR environment variable to be whatever:


export EDITOR=$(which nano)

Try out ‘crontab -e’ and make sure it’s what you want.

Now that it’s working, put that line in your ~/.bashrc file so that the
change is permanent for your user specifically, then logout/login or
restart your terminal to apply the change:


echo "export EDITOR=\$(which nano)" >> ~/.bashrc

You could also start a new ‘bash’ session from wherever you are to see the
change (‘bash’ followed by [Enter]).


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…