Neither vim
nor neovim
are installed by default on an Ubuntu system. By default, Ubuntu comes with a minimal version of Vim through the package vim-tiny
.
If on your system, 'vim --version' brings up information on neovim, which is a fork of vim, then it means you once installed neovim (package neovim
). During installation, that package will have the commands vi
and vim
point to nvim
(/usr/bin/nvim
) using the "debian alternatives" system:
sudo apt install neovim
Setting up neovim (0.4.4-1) ...
update-alternatives: using /usr/libexec/neovim/ex to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/libexec/neovim/rvim to provide /usr/bin/rvim (rvim) in aut
o mode
update-alternatives: using /usr/libexec/neovim/rview to provide /usr/bin/rview (rview) in
auto mode
update-alternatives: using /usr/bin/nvim to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/nvim to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/libexec/neovim/view to provide /usr/bin/view (view) in aut
o mode
update-alternatives: using /usr/libexec/neovim/vimdiff to provide /usr/bin/vimdiff (vimdif
f) in auto mode
These links will be set up only if they are not already enabled. For example, if you previously installed vim
, the commands vi
and vim
will continue to point to vim
, /usr/bin/vim.basic
. By default, the command vim
is not available, and vi
points to /usr/bin/vim.tiny
.