Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 2398  / 2 Years ago, wed, march 2, 2022, 6:35:24

When you type vi in the terminal, the following output is shown



~                             VIM - Vi IMproved                                
~
~ version 7.3.547
~ by Bram Moolenaar et al.
~ Modified by [email protected]
~ Vim is open source and freely distributable
~
~ Help poor children in Uganda!


So according to this, vi must be launching VIm.

But when you type vim it gives



aditya@aditya-desktop:~$ vim
The program 'vim' can be found in the following packages:
* vim
* vim-gnome
* vim-tiny
* vim-athena
* vim-gtk
* vim-nox
Try: sudo apt-get install <selected package>


This shows that vim is not installed.

Notably man vi and man vim launch the same man pages.



So what does the vi command actually launch?


More From » vim

 Answers
2

It is vim-tiny: "Vi IMproved - enhanced vi editor - compact version".



I did this on 13.10:



user@ubuntu:~$ which vi
/usr/bin/vi
user@ubuntu:~$ which vim
user@ubuntu:~$ ls -l /usr/bin/vi
lrwxrwxrwx 1 root root 20 ago 13 2013 /usr/bin/vi -> /etc/alternatives/vi
user@ubuntu:~$ ls -l /etc/alternatives/vi
lrwxrwxrwx 1 root root 17 dic 20 04:39 /etc/alternatives/vi -> /usr/bin/vim.tiny
user@ubuntu:~$ apt-cache search vim.tiny
vim-common - Vi IMproved - Common files
vim-tiny - Vi IMproved - enhanced vi editor - compact version
user@ubuntu:~$ dpkg --get-selections | grep vim
vim-common install
vim-tiny install


As you can see, vim is not installed (empty output), vi is a symlink to /etc/alternatives/vi (see alternatives mechanism), which is a symlink to /usr/bin/vim.tiny, which belongs to package vim-tiny.


[#26494] Friday, March 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
feeous

Total Points: 102
Total Questions: 122
Total Answers: 119

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
;