How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions

This quick tutorial shows the steps for installing the latest version of Vim on Ubuntu Linux.
Warp Terminal

Vim is one of the most popular terminal-based text editors. However, it is not installed by default on Ubuntu.

Ubuntu uses Nano as the default terminal editor. Nano is also an excellent tool and I am not going into Nano vs Vim debate.

If you have already spent some time mastering the Vim shortcuts, you don’t have to forget them and start using a new editor.

You can install Vim on Ubuntu using the following command in the terminal:

sudo apt install vim

That’s quite simple, right? This approach’s major problem is that you won’t get the latest Vim version.

You can check the installed Vim version with the following command:

vim --version

And if you check the Vim website, you’ll find that Vim has newer versions released already.

At the time of writing this article, Vim 9.0 is released but is not available in Ubuntu repositories yet.

The good news is that you can install the latest Vim using an unofficial but actively maintained PPA.

Install Vim 9 on Ubuntu using a PPA

If you have specific Vim configuration files, there is no harm in making a backup for them.

Now, to install the latest Vim version, add the PPA repository first:

sudo add-apt-repository ppa:jonathonf/vim
install latest Vim on ubuntu using ppa
Adding the PPA to get the latest Vim version

You don’t need to update the package cache on Ubuntu but other distributions like Mint may still require it:

sudo apt update

Now, use the command below to install the latest Vim version offered by the PPA:

sudo apt install vim

If you had already an older Vim version installed, it would be upgraded. You can check the installed Vim version using:

vim --version
vim 9 ubuntu
Checking installed Vim version

This is a very well-maintained PPA and is available for all active Ubuntu versions.

If you are new to this PPA thing, I have a detailed guide on this topic. You should read to learn more about the concept of PPA in Ubuntu.

Mastering Vim Quickly

Master Vim like a true professional with this highly rated, premium Vim book and training course.

Chek it out

Downgrade or remove it

If you want to go back to the older Vim version provided by Ubuntu, you should remove the existing version, remove the PPA and install it again.

Before removing Vim, you should copy the vimrc or other such config file if you had made custom changes and plan to use Vim again.

Alright. Open a terminal and use the following command:

sudo apt remove vim

Now delete the PPA otherwise you’ll get the latest Vim again (if you try installing Vim for the older version):

sudo add-apt-repository -r ppa:jonathonf/vim

Now, if you want the old, official Ubuntu version of Vim, just install it again using the apt command.

Enjoy Vim on Ubuntu.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.