This kind of thing is sooo frustrating. Following these instructions to install Edimax wifi dongle, and I'm stuck at 'configure wireless network connection'. The command sudo vi /etc/network/interfaces opens the file in a viewer, either in the GUI or from command line. But there are no instructions for how to edit/save/exit and anything you enter seems to change the file. The only way to ecxit is to pull the power plug and afterwards the pi fails to load - it just rotates endelssly through the installation sequence - requiring a fresh installation. I've had to reinstall twice now because of this.

So please: 1. are there any instructions for the vi app? For instance this guide makes no mention. 2. is there any way to undo changes in vi?


1 Answer 1


vi -- or at, least, the "improved" version, vim -- is a great piece of software, but it is not easy to use, and the default configuration, which does not indicate the difference between insert and command modes, is awkward (the basic philosophy is that features are not enabled, making it seem pretty "featureless").

I totally encourage you to learn vim at some point, if it holds some appeal for you. However, what I don't recommend is trying to hack-use it while you are also trying to do some other thing for the first time -- as you observe, this will probably be a very frustrating, "WTF?" laden experience.

A lot of linux/unix instructions include references to vi because it is required software on such systems, so it is guaranteed to be there. Some stuff replaces this with nano, which is not required, and therefore might not be available, but it is a much much simpler beast than vi and should be easy; the ^X ^G functions at the bottom mean "ctrl-X", "ctrl-G", etc, and one of them is a help.

I think nano is included in the base raspbian but if not, just apt-get install nano. Then you can just use nano instead of vi for simple tasks like this.

WRT "are there any instructions for the vi app" -- yes, there are entire books on it, and a built-in help feature with plenty of available reading. I recommend you add this to the top of ~/.vimrc

set nocp

And try vimtutor. If that's what you really want to do ;).

To just exit, hit esc then type :q!.

  • 1
    Thanks goldilocks this is this kind of useful guidance I wish I'd read sooner!
    – geotheory
    Aug 31, 2013 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.