Where is my vim installed?
If you installed through apt
the following sequence should get you to the Vim installation.
From inside Vim,
:echo $VIMRUNTIME
/usr/share/vim/vim74
You could look in here and you would discover the Vim files, but if you wanted a more programmatic, portable approach, you could then use dpkg
i.e.
dpkg -S, -- search for file owner
:
this tells you which .deb
package/s are responsible for the path /usr/share/vim/vim74
.
$ dpkg -S /usr/share/vim/vim74
vim-tiny, vim-runtime, vim-common: /usr/share/vim/vim7
These are the packages, so you can use dpkg --list-files
to tell you where all the files belonging to the packages are. For example, if you run
dpkg --list-files vim-runtime
you'll get a dump of file names, which will tell you where the bulk of the vim installation is.
You'll see that on Debian and Ubuntu, most of Vim's files are in /usr/share/
. 1
1folder for architecture independent files as per the Filesystem Hierarchy Standard.
which vim
but muru is right when he asks what problem are you trying to solve. You should edit your question and give more details about that.dpkg -L vim | grep bin
apt
anddpkg
don't install vim in a single package "vim", its organised as mulitple dependency packages, sodpkg -L vim
isn't necessarily going to be useful. e.g. forvim-gtk
it doesn't even mention where the$VIMRUNTIME
is at allapt-get install vim
. So he can see what is installed with the provided command. And yes, on Ubuntu there exists a basic package vim. Seeapt-cache show vim
Yes there are other vim flavor packages. Then one should check which package was installed and can use that package name instead of vim in the above command.