When I type vi
into terminal, VIM starts up. But when I type vim
into terminal, the terminal says The program 'vim' can be found in the following packages:
and lists different varieties of vim, as if I don't have vim installed. Is there a reason for this? Is the vi
that comes with ubuntu not the same as VIM?
Ubuntu – Why does vi start vim but typing vim says vim needs to be installed
command linevim
Best Answer
Well, you do have
vim
installed, but a minimal version of it calledvim-tiny
. If you runvim.tiny
, you'll find it runs. This version has very few features enabled, and therefore doesn't provide thevim
command. The other packages,vim-nox
,vim-gnome
,vim-gtk
,vim-athena
, have more features, and provide thevim
command.The
vi
command itself is actually a symbolic link, and points to whichever preferred version is installed through the Debian alternatives system. By default, since onlyvim-tiny
is installed, the only alternative isvim.tiny
, and runningvi
actually runsvim.tiny
. If you install one of the other packages, they will become the preferred alternative forvi
.Related: