Change default editor

By Ali Karbassi | January 14th, 2007 | Linux, Ubuntu

There is a quick way to change your default editor, whichever you want.

First open up a terminal by going to Applications > Accessories > Terminal (in Ubuntu) or press Alt + F2 and type in terminal. Now that you have a terminal open, let’s get down to viewing your history.

Open up .bashrc by typing:

gedit ~/.bashrc

Now to change your bash default editor find

export EDITOR

However, if you can’t find that, just add this to the top.

export EDITOR=gedit

Personally I like gedit. You can use pico (/usr/bin/pico), nano (/usr/bin/nano), or any other editor you like.

Like always, you can learn more about this by doing the following:

man bash

2 Responses to “Change default editor”

  1. [...] Original post by tech.karbassi.com [...]

  2. Johannes Martinsson

    use VISUAL for the gui version and EDITOR for a tui version…

    e.g.

    export EDITOR=vim
    export VISUAL=gvim

Leave a Reply