Casa > O > Onde Está Localizado O Vim No Ubuntu Linux E Como Ele Está Instalado?

Onde está localizado o Vim no Ubuntu Linux e como ele está instalado?

“which vim” tells you where it is.

  1. matthew@bigfoot:~$ which vim 
  2. /usr/bin/vim 

On my system it’s /usr/bin/vim.

If you didn’t install it from source, it’s most certainly installed using a dpkg package and most probably from APT.

Para a maioria dos pacotes você pode usar "dpkg -S name" para dizer qual pacote instalou o arquivo.

Mas o VIM é um pouco especial, porque ele usa o sistema alternativo Debian (DebianAlternatives - Debian Wiki) já que vários pacotes podem fornecê-lo. Porque é que eu sei isto? Porque se você fizer "ls -l /usr/bin/vim", ele lhe diz que o arquivo é um link simbólico para /etc/alternatives/vim.

  1. matthew@bigfoot:~$ ls -l /usr/bin/vim 
  2. lrwxrwxrwx 1 root root 21 Sep 15 22:24 /usr/bin/vim -> /etc/alternatives/vim 

As it turned out, /etc/alternatives/vim is itself another symbolic link, that, on my system, points to /usr/bin/vim.basic

  1. matthew@bigfoot:~$ ls -l /etc/alternatives/vim 
  2. lrwxrwxrwx 1 root root 18 Sep 15 22:24 /etc/alternatives/vim -> /usr/bin/vim.basic 

Finally, we can figure out which package is responsible for it.

  1. matthew@bigfoot:~$ dpkg -S /usr/bin/vim.basic 
  2. vim: /usr/bin/vim.basic 

It’s the vim package! As you might have guessed.

De Lorene

O que é uma aplicação de ecrã verde? :: Bhim ou Phonepe não estão verificando o número do celular Jio em um dispositivo 4G LTE. Porquê?