What is the command in the terminal to update Vim on Ubuntu?

To get the latest stable version, it is recommended by the official instructions to directly install it from the source GitHub repository.

$ git clone https://github.com/vim/vim.git
$ cd vim/src
$ make
$ sudo make install

You can also use apt-get update && apt-get install vim to update Vim to the latest version available in your distribution's packages registry. To update all available packages, you can run apt-get update && apt-get upgrade

However, you may not get the latest version of Vim with APT (you'll moszt likely the latest major version, but not the minor / patch versions).


Run these commands in a terminal:

sudo apt-get update
sudo apt-get install vim

Note that Ubuntu may not always have the latest packages due to the [official] repositories being frozen.


the best answer to this question is https://vi.stackexchange.com/a/10827/32151

and according to the linked answer, another way to doing this is using Personal Packet Archive (PPA)

add this PPA

sudo add-apt-repository ppa:jonathonf/vim

Update the package lists:

sudo apt update

install vim:

sudo apt install vim

Tags:

Vim