Why provide vi and vim?

RedHat and its variants/clones tend to provide a /bin/vi that is essentially Vim compiled with the bare minimum of features and fewer library dependencies so it is more likely to be able to run even with a damaged filesystem. It is also smaller than a "normal" or "huge" version of Vim, which at one time was a consideration even if it does not matter as much now.

Basically it is there as a "fallback" for users and admins that need a text editor and are at least minimally familiar with vi. For those who want a more powerful editor, they usually have to expressly install "vim-enhanced" or whatever their distribution provides for a "full featured" Vim.

I have seen even tinier versions of vi or vi-like editors that are not a stripped down Vim that some of the compact distributions use. Busybox integrates one.


Old question but it's still true Redhat provides vi removing dependence on /usr (except for ftdetect - probably harmless) and a whole lot of modules that at one time had security issues. Vim is part of vim-enhanced and not installed by default on server builds. It includes scripts in /etc/profile.d to alias vim if not set and the euid > 200. There also are two rc files for each, .virc for vi and .vimrc for vim, leading to a lot of head scratching as to why it works in one place but not the other.

There are other ways to do this but you can see what each is doing two ways:

(vi|vim) -V
strace (/usr/bin/vi|/usr/bin/vim) -c q # quit immediately