jump to navigation

How to change the default shell editor in Ubuntu 2008-06-18

Posted by claudio in Uncategorized.
Tags: , , , ,

Using nano as the default shell editor is probably a great choice for a Gnu/Linux distribution (also) aimed for Unix newbies. If you know your way on the command line however, you’ll scream from frustration for every “i”, “:wq!” or “ZZ” you type and you see the characters in the text you are editing. Specially frustrating in cron. If you don’t know what “i”, “:wq!” or “ZZ” do, don’t worry, nano is working fine for you.

Here what to do to change the system wide settings (instead of using the EDITOR variable):

claudio@brisbane:~$ sudo update-alternatives --config editor
[sudo] password for claudio:

There are 4 alternatives which provide `editor'.

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

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


1. gladtocode - 2012-04-13

Thanks this was helpful to me.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: