Koozali.org: home of the SME Server

How to change default editor

Offline beast

  • *
  • 238
  • +0/-0
How to change default editor
« on: April 26, 2013, 01:02:17 PM »
Hi

When I execute "crontab -e" on a fresh install it uses VI as default editor. After installing some contribs the editor is pico somehow.

I install these contribs as standard:

Denyhost
Awstats
WBL
Phpmyadmin

and affa to migrate BTW

One of these must change the default editor?

Now I have made a second server to work only as a backup server with a fresh install and the default editor is now vi -AND I HATE VI ;-)

How do I change the default editor - recommended way?

Normally I make a symbolic link between pico and nano so nano is used - this seam not to work with vi.

Regards
Benny
« Last Edit: April 26, 2013, 03:07:55 PM by beast »

Online warren

  • *
  • 291
  • +0/-0
Re: How to change default editor
« Reply #1 on: April 27, 2013, 12:58:35 AM »
Hi Benny

Edit your .bashrc ( nano .bashrc ) and add the following

export EDITOR=/usr/bin/nano

save the file.
logout and logback in to enable the environment variable