RHEL이 기본적으로 두 개의 vim을 설치하는 이유는 무엇입니까?

RHEL이 기본적으로 두 개의 vim을 설치하는 이유는 무엇입니까?

RHEL 8.3 시스템을 사용하고 있습니다. 내장 vim과 .vivim내 테스트는 다음과 같습니다.

[root@192 ~]# which vim
/usr/bin/vim
[root@192 ~]# which vi
/usr/bin/vi
[root@192 ~]# ls -lah `which vim`
-rwxr-xr-x. 1 root root 3.0M Jun  3  2020 /usr/bin/vim
[root@192 ~]# ls -lah `which vi`
-rwxr-xr-x. 1 root root 1.2M Jun  3  2020 /usr/bin/vi
[root@192 ~]# vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  3 2020 09:07:54)
Included patches: 1-1763
Modified by <[email protected]>
Compiled by <[email protected]>
Huge version without GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
-balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
-browse            +fork()            -mzscheme          +textobjects
++builtin_terms    +gettext           +netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          -toolbar
+cindent           +insert_expand     +path_extra        +user_commands
-clientserver      +job               +perl/dyn          +vertsplit
-clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           +python/dyn        +vreplace
+conceal           +linebreak         +python3/dyn       +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       +lua/dyn           +ruby/dyn          -X11
+dialog_con        +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             -xim
+digraphs          +modify_fname      +smartindent       -xpm
-dnd               +mouse             +startuptime       -xsmp
-ebcdic            -mouseshape        +statusline        -xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              +mouse_gpm         +syntax            
+ex_extra          -mouse_jsbterm     +tag_binary        
+extra_search      +mouse_netterm     +tag_old_static    
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.6m -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim        -lm  -lselinux   -lncurses -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc        
[root@192 ~]# vi --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  3 2020 09:07:06)
Included patches: 1-1763
Modified by <[email protected]>
Compiled by <[email protected]>
Small version without GUI.  Features included (+) or not (-):
+acl               -extra_search      -mouse_netterm     -tag_old_static
-arabic            -farsi             -mouse_sgr         -tag_any_white
+autocmd           -file_in_path      -mouse_sysmouse    -tcl
-autoservername    -find_in_path      -mouse_urxvt       -termguicolors
-balloon_eval      -float             -mouse_xterm       -terminal
-balloon_eval_term -folding           +multi_byte        +terminfo
-browse            -footer            -multi_lang        -termresponse
+builtin_terms     +fork()            -mzscheme          -textobjects
-byte_offset       -gettext           -netbeans_intg     -timers
-channel           -hangul_input      -num64             -title
-cindent           +iconv             +packages          -toolbar
-clientserver      -insert_expand     -path_extra        -user_commands
-clipboard         -job               -perl              +vertsplit
-cmdline_compl     +jumplist          -persistent_undo   -virtualedit
+cmdline_hist      -keymap            -printer           +visual
-cmdline_info      -lambda            -profile           -visualextra
-comments          -langmap           -python            -viminfo
-conceal           -libcall           -python3           -vreplace
-cryptv            -linebreak         -quickfix          +wildignore
-cscope            -lispindent        -reltime           -wildmenu
+cursorbind        +listcmds          -rightleft         +windows
-cursorshape       -localmap          -ruby              +writebackup
-dialog            -lua               +scrollbind        -X11
-diff              -menu              -signs             -xfontset
-digraphs          -mksession         -smartindent       -xim
-dnd               -modify_fname      -startuptime       -xpm
-ebcdic            -mouse             -statusline        -xsmp
-emacs_tags        -mouse_dec         -sun_workshop      -xterm_clipboard
-eval              -mouse_gpm         -syntax            -xterm_save
+ex_extra          -mouse_jsbterm     +tag_binary        
   system vimrc file: "/etc/virc"
     user vimrc file: "$HOME/.virc"
 2nd user vimrc file: "~/.vim/virc"
      user exrc file: "$HOME/.exrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim80"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/python3.6m -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib -Wl,--as-needed -o vim        -lm  -lselinux -lncurses -lacl -lattr -ldl           
[root@192 ~]#

왜 두 가지 다른 버전을 유지합니까? 나에게는 조금 이상합니다. vi사용자가 최신 편집기를 사용하기를 원한다면 vimUbuntu 20.04 시스템의 결과는 다음과 같습니다. vi둘 다 vim그것을 가리키고 있는데 nvim, 이는 합리적입니다.

root@u2004:~# which vi
/usr/bin/vi
root@u2004:~# which vim
/usr/bin/vim
root@u2004:~# ls -la `which vi`
lrwxrwxrwx 1 root root 20 Aug 28  2020 /usr/bin/vi -> /etc/alternatives/vi
root@u2004:~# ls -la `which vim`
lrwxrwxrwx 1 root root 21 Apr  1 08:28 /usr/bin/vim -> /etc/alternatives/vim
root@u2004:~# ls -la /etc/alternatives/vi
lrwxrwxrwx 1 root root 13 Apr  1 08:28 /etc/alternatives/vi -> /usr/bin/nvim
root@u2004:~# ls -la /etc/alternatives/vim
lrwxrwxrwx 1 root root 13 Apr  1 08:28 /etc/alternatives/vim -> /usr/bin/nvim
root@u2004:~# man hier
root@u2004:~# readlink -f `which vi`
/usr/bin/nvim
root@u2004:~# readlink -f `which vim`
/usr/bin/nvim
root@u2004:~#

답변1

vivi클래식 과 최대 호환성을 갖춘 모드에서 Vim(미니멀리스트 버전)을 시작 합니다 vim-minimal.vimvim-enhanced

이전 버전의 RHEL에는 이전에 이 시스템이 없었기 /etc/alternatives때문에 이전에는 이런 방식으로 수행했으므로 RHEL은 이전 버전과의 호환성을 위해 여전히 이 시스템을 수행합니다.

관련 정보