Install vim in Ubuntu 22.04

In this article, we would discuss how to install vim in Ubuntu 22.04 release. First, we cover a bit about vim. vim is a free and open source text editor. It was first released in November, 1991. And, at the time of writing, the latest stable release of vim is 8.2.3995. It is an improved version of vi. Furthermore, it is a cross-platform application.

If you want to check how to Edit files with vim then, follow the link.

Although, the package is already installed as default in some Ubuntu configurations. But, if its still not there then, follow the steps mentioned here.

Check whether vim is there or not. Open a terminal and issue the following –

vim -v

If vim is installed, it would show you the installed package version and other details. Enter :q to quit from the session. But, if its not there, then it would throw an error –

bash: /usr/bin/vim: No such file or directory

Note: Following operations would require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.

Install vim in Ubuntu 22.04

Since the package is already available through standard Ubuntu repository. Therefore, we need to update the repository first. This ensures we get to have the latest version of package available to install. Hence, open a terminal and issue the following –

sudo apt update

Thereafter, to install vim –

sudo apt install vim

To check for vim version installed –

vim -v

To quit the session –


Try opening a file using vim

vim <file_name>

In conclusion, we have discussed how to install vim in Ubuntu 22.04 release. We would like to add here that, initially we may find vim pretty tough to use. But, in reality, it is one of easiest to understand. Once we have memorized the shortcuts then, you may find it faster and far more efficient than other GUI based text editors.