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.