jump to navigation

How to change the default shell editor in Ubuntu June 18, 2008

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

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'.

About these ads

Comments»

1. gladtocode - April 13, 2012

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 145 other followers

%d bloggers like this: