How to set default editor for your Linux account?

Your default editor is vi and you don’t have time to learn the most powerful Linux editor (vi). Here is how to set your default editor, whether its nano, pico or back to vi.

You can set your default editor to pico or nano, its more simple than vi (in my personal opinion).

Other case: default editor is vi, but vi is not installed. You’ll get something like:
/bin/sh: /usr/bin/vi: No such file or directory
crontab: "/usr/bin/vi" exited with status 127

Here is how to set your default editor, whether its nano, pico or back to vi.

Nano:
export EDITOR="nano -w"

Pico:
export EDITOR="pico -w"

Back to vi:
export EDITOR="vi"

Tagged with 
About sepedatua
I am nothing special, of this I am sure. I am a common man with common thoughts and I’ve led a common life. There are no monuments dedicated to me and my name will soon be forgotten, but I’ve loved another with all my heart and soul, and to me, this has always been enough.

Leave a Reply