How to set Nano as the default text editor on ClearOS

This document will guide you through the process of setting a default editor. There are two safe ways. Both are covered here.

Temporal editor passing a variable

You will need to put a variable, for example. To use nano when you are going to edit a crontab, do the following:

EDITOR=nano crontab -e

This will use nano only for that execution.

Permanent for specific commands

You will need to do the following:

alias crontab='EDITOR=nano /usr/bin/crontab'

This will work on your current session. If you want to make it permanent, you can put this line in your bash files

nano ~/.bash_profile
nano ~/.bashrc


Show PHP error messages