I just installed Ubuntu a few days ago and I am trying to download and use VIM.

So I went to terminal and ran sudo apt-get install vim, and everything went fine with running the command, the only problem is that I can not for the life of me figure out how to actually run or even access the files that were downloaded.

So, how do I access the files installed with sudo apt-get install vim? Or an even shorter question: given my circumstances, how do I run vim?

  • 4
    Open up the terminal and type vim then press enter... – Parto Nov 19 '14 at 20:46
  • 1
    type vim foo.txt :) – Ampt Nov 19 '14 at 20:46

As the comments have indicated, you should just be able to type vim or vim filename.txt and it should start for you.

As for the file(s), you should be able to see where Vim is located on your file system using the which command. From there you can ls the locations to find the files. On my system, I can track-down Vim like this:

$ which vim
$ ls -al /usr/bin/vim
lrwxrwxrwx 1 root root 21 Nov 19 18:10 /usr/bin/vim -> /etc/alternatives/vim
$ ls -al /etc/alternatives/vim
lrwxrwxrwx 1 root root 18 Nov 19 18:10 /etc/alternatives/vim -> /usr/bin/vim.basic
$ ls -al /usr/bin/vim.basic
-rwxr-xr-x 1 root root 2015392 May  3  2012 /usr/bin/vim.basic

You can use

$ which vim

to identify where vim has been installed into.

And use

$ vim

to open vim editor. If you want to know the parameters that you can pass type

$ vim -h

And also to edit a specific file or create a file in a particular file name, use

$ vim file_name

I love vim, but it is not the simplest thing to learn how to use. The default install is not very good either due to space considerations. Your sudo apt-get install vim is a good start to having a more usable install of vim.


then :help will get you started. which vim shows as @BryceAtNetwork23 mentioned. To really learn try:


To see a list of all the files installed by any package use dpkg -L vim-tiny. To view a package and their dependencies use apt-cache show vim-tiny. I also recommend you install sudo apt-get install vim-doc, a suggested package but not a dependency so it's not installed by default.


This command will show you all the files that were installed by a package.

$ dpkg-query -L vim

In this case, the executable is


Or just vim, which calls vim.basic.

$ update-alternatives --list vim
  • @bs7280 Were you satisfied with my answer? Then give me a upvote (∧). If I could solve your problem, then it would be nice if you'd mark my answer (✓). ;) – A.B. Apr 18 '15 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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