How to change the default command line text editor in Ubuntu….

datePosted on 12:10, September 28th, 2009 by Many Ayromlou

I love Ubuntu, but there is one thing that really bugs the hell out of me. The default configured editor in Ubuntu is nano, a Pico clone. I hate Pico, therefor I hate nano :-). So how would you go about fixing this and changing the default editor to vi (or vim):

  1. Issue the following command: sudo update-alternatives --config editor
  2. Enter the superuser password when prompted.
  3. At the following screen choose the number beside the editor you want as default or alternatively just press Enter to keep the default the same.
    There are 3 alternatives which provide `editor'.

    Selection Alternative
    -----------------------------------------------
    1 /usr/bin/vim.tiny
    2 /bin/ed
    *+ 3 /bin/nano

    Press enter to keep the default[*], or type selection number: 1
    Using '/usr/bin/vim.tiny' to provide 'editor'.

That’s it…..Have fun.

categoryPosted in CLI, Linux, Ubuntu | printPrint

Leave a Reply

You must be logged in to post a comment.