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"

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: