How can I set nano as the default editor in a jail, and make it stick?

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
I know that I can set nano as the default editor in a jail using the command:

Code:
setenv VISUAL /usr/local/bin/nano && setenv EDITOR /usr/local/bin/nano


However, each time I log out from the jail, then log back in, I need to re-run this command to set nano as the default again.

I did google this, but couldn't find a solution that worked on a FreeBSD jail - how do I set nano to be the default, even after I log out and back in again?

Thank you for your help!
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Since they are using setenv, it's probably safe to assume root and (t)csh - so .cshrc.
 

GJSchaller

Contributor
Joined
Feb 10, 2021
Messages
100
Thank you! I'm using the defaults for a new jail, and added these two lines to /root/.cshrc :

setenv VISUAL /usr/local/bin/nano
setenv EDITOR /usr/local/bin/nano

Rebooted the jail, logged back in, and Nano was my default editor. Thank you for the guidance!
 
Top