Lubos Rendek

The only solution is determination.

Change Default Text Editor in Debian Linux

| Comments

Currently the default editor for Debian Linux is nano. This may be happy news for all nano fans out there. This means that any application on command line requiring such us crontab will open nano editor by default. If you prefer different editor such as vi or vim you can update your default settings with a following command:

1
update-alternatives --config editor

this will output more options for you to choose from depending on what text editors are currently installed on your system.

1
2
3
4
5
6
7
8
9
10
11
There are 3 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/nano            40        manual mode
  2            /usr/bin/vim.basic   30        manual mode
  3            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in manual mode

From the above you can see that in order yo change your default editor in Debian or Ubuntu Linux you simply choose selection number followed by ENTER.

Comments