How To Install Vim 8.2 on Ubuntu 18.04

April 11, 2019


Vim (Vi Improved) is one of the clone versions of the text editor vi. With features such as syntax highlighting and new editing commands, Vim is one of the best text editors for the development environment.

Vim comes standard with most Linux distributions, but if you want the latest available version, you need to use git.

In this tutorial, learn how to install the latest Vim editor on Ubuntu 18.04 operating system.

Tutorial on how to install the Vim editor on Ubuntu


  • A user with sudo privileges
  • Access to a terminal/command line
  • Ncurses libraries
  • The following Linux packages: git, make, build-essential

Steps For Installing Vim on Ubuntu

Step 1: Install Necessary Tools

Before you can install an application from GitHub, you need to meet the requirements. Run the following commands:

sudo apt-get install libncurses5-dev libncursesw5-dev

This command installs two necessary ncurses packages. The last few lines in the output should look similar to this:

terminal output when installing ncurses packages

Once it’s done, install git with this command:

sudo apt install git

After git, install the make tool. This tool necessary to build and install packages from non-official repositories.

sudo apt install make

The final package to install is the build-essential package which contains the compiler we need.

Enter this command:

sudo apt install build-essential

Give it a minute or two to finish, and you are ready to install the latest Vim from GitHub.

Step 2: Install Vi Improved (Vim) Text Editor

Installing Vim on Ubuntu requires a few steps.

1. Download Vim from its GitHub repository to your machine.

Run this command:

sudo git clone
git clone command to download files to your system

When the system finishes downloading the files, navigate to the download directory. In this case, go to the vim/src directory by typing:

cd vim/src

2. Build the software with the make tool.

In the terminal, enter:

sudo make

Let the system finish building the program from its source code.

3. Place the program we just built to the correct location. This step includes Vim’s libraries and documentation.

To do so, enter the following command:

sudo make install

The output should look similar to this:

output of sudo install make command ubuntu terminal after installing vim

You are now ready to use Vim 8.2 on your system.

Step 3: Verify Vim Installation

To verify the installation process has completed successfully, check the version of Vim on your system.
In the terminal, run this command:

vim -v

The editor will open and show you the current version of Vim.

Vim showing the version of the application installed on Ubuntu

How to Uninstall Vim

If you decide to uninstall Vim from your system, you can remove it with the following command:

sudo apt remove vim

Then, type in the password and press y to confirm.

removing the vim installation from ubuntu 18.04

This command removes the latest version from the GitHub repository. After this, you can use the apt install vim command if you want to return to the release from the official repository.

New features in Vim 8.2

The latest release of Vim includes a few new features, bug fixes, and documentation updates.

The most significant feature is support for running popup windows allowing you to display text on top of other windows. Other changes include a few new commands and the function chaining for method calls.


This guide showed you how to install the latest Vim editor on Ubuntu 18.04. Make sure you have all the tools available before you start building and installing Vim from unofficial repositories.

Was this article helpful?
Sofija Simic
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How to Install Vim 8.2 on CentOS 7
September 10, 2019

Official repositories struggle to keep pace with updates and new software versions. This article provides ...
Read more
22 Best Linux Text Editors for Programming & Coding
September 3, 2019

A text editor is an application that lets you type text. All Linux distributions come with built-in editors ...
Read more
How to Create a File in Linux Using Terminal/Command Line
June 27, 2019

Creating a file in Linux might seem straightforward, but there are some surprising and clever techniques.
Read more
How to Save a File in Vi / Vim & Exit
September 22, 2022

Vim (Vi IMproved) is a well-known, open-source text editor for Linux or Unix systems. It is a powerful and ...
Read more
  • © 2022 Copyright phoenixNAP | Global IT Services. All Rights Reserved.