Change default editor in Debian

How to change the default editor in Debian (for root), as I keep forgetting:

sudo update-alternatives --config editor

My ~/.zshrc takes care of this for my personal account, but it’s nice to change root’s settings so a better editor (than nano) comes up when editing (for example), root’s crontab, /etc/sudoers (via visudo), and so on.

Tags: ,

Share This


2 Responses to Change default editor in Debian

  1. Good to know – I traditionally apt-get purge every editor that is not vim so there is only one choice, but that only works for my personal boxes.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>