Gentoo Wiki


This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

The default editor in Gentoo is used by various console applications which initiate editing of config files (crontab) or require input that it too complicated to enter on the command line (svn). Initially, the default editor is set to Nano.

Global setting

To change this setting system wide, change the EDITOR variable in /etc/rc.conf to the editor you wish to use. For example:

File: /etc/rc.conf
 # Set EDITOR to your preferred editor.

Per-user setting


export EDITOR=/usr/bin/emacs

to change the editor only for the current session, or

echo -e "export EDITOR=/usr/bin/emacs" >> ~/.profile

to change it permanently.

Retrieved from ""

Last modified: Thu, 04 Sep 2008 03:58:00 +0000 Hits: 12,304