Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently got a copy of Ubuntu 12.04.2(LTS), but unfortunately problem occurs while trying VI editor. I have heard that VIM (VI improved) should be installed in order to use vi in this version. If this is the case then is there any way to install it OFFLINE? Is there any alternate editor that can be used to write shell scripts or C source programs.

share|improve this question

migrated from Sep 25 '13 at 14:24

This question came from our site for professional and enthusiast programmers.

The vi command that ships with Ubuntu is the tiny version of Vim. What "problem" do you have with it? – Ingo Karkat Sep 25 '13 at 13:57
Also, your question is more about your Ubuntu system environment, not about programming, so it's better addressed at SuperUser. – Ingo Karkat Sep 25 '13 at 13:58
I can execute shell commands there. Can also evoke the vi editor using vi [filename]. But I have problem with the modes in the editor which doesn't work for me. @IngoKarkat – rosemary Sep 25 '13 at 14:04
Are you uncomfortable with modal editing in general? Type vimtutor to get an introduction. Or try a more straightforward editor like nano. – Ingo Karkat Sep 25 '13 at 14:06
Just a suggestion if you may. Try gedit instead – Arnold Sep 25 '13 at 15:41

The package for the terminal version of Vim is named vim. You can download it and its dependencies here. You need to at least also install the vim-common and vim-runtime packages.

There's also a GUI version of Vim, the package name is vim-gnome.

share|improve this answer
thnks, I also want to know whether it can be done just offline,I mean downloading first,because the machine where ubuntu is installed has no internet connection @Ingo Karkat – rosemary Sep 25 '13 at 14:10
The download links are at the bottom of the linked page; you can choose between 32-/64-bit versions. The will get you a *.deb file which you can then install with dpkg -i *.deb. – Ingo Karkat Sep 25 '13 at 14:16

I think the vi come with Ubuntu12.04 is vim tiny or something like that which is not fully featured one. You can install it offline, get a deb package for vim and copy it to your machine, use dpkg -i your_deb_package.

share|improve this answer
thnxx @john smith , I have to try it,where do I get a deb package? You are right,but some of the modes in the editor doesn't work properly.. – rosemary Sep 25 '13 at 13:58
you may found it here. look for vim gnome. – John Smith Sep 25 '13 at 13:59

The vi command is available by default on every UNIX-y operating system, including Ubuntu 12.04 LTS.

On Debian-based systems like Ubuntu, vi is not the original vi but a lightweight Vim build that usually lacks a few useful features like clipboard or scripting support.

You are not very clear about the "problem" that "occurs". Without more information, we can't do much more than provide generic advices.

  • If you are really unable to install/update your programs your only solution is to customize your Vim config as well as you could. Run the following command in a terminal emulator:

    $ touch ~/.vimrc

    You should now be able to use the vim command with saner defaults. After that, you are on your own for the rest of the learning curve.

  • If you are able to update/install programs, use the Synaptic package manager or apt-get to install the vim-gnome or vim-gtk package which are much more complete than the default build.

    Once the installation is complete, create a ~/.vimrc like above and enjoy the ride.

share|improve this answer
I mean to say commands pertaining to the modes like :i, :x aren't working properly.For example,in input mode I can't use backspace to delete some characters, the keys behave abnormally. @romainl – rosemary Sep 25 '13 at 14:19
Not all version of Ubuntu includes vim/vi. The user has to install it normally in 13.04. – Braiam Sep 25 '13 at 15:25
@rosemary. The backspace behaviour is default vi behavior. You must do quite a lot of configuration if you want it to behave "normally". Your vim works perfectly: no need to reinstall it! – romainl Sep 25 '13 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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