How to install CMake on Ubuntu 18.04

How to install CMake on Ubuntu 18.04

Install CMake on Ubuntu 18.04

CMake is a free, open source, cross-platform family of tools designed to build, test, and package software. Created by kitware for a powerful cross-platform build environment for open source projects such as VTK and ITK. In this tutorial, you will learn how to install CMake on Ubuntu 18.04.


Before installing CMake on Ubuntu 18.04. The system requires a non-root user account with sudo privileges.

Install the latest version of CMake

Ubuntu Global Repository does not provide the latest version of CMake. Here, CMake is installed by first downloading and then installing.

First, press to open the terminal Ctrl+Alt+t On Ubuntu systems.

download now CMake To follow wget Terminal commands:


Unzip the downloaded file cmake-3.15.2.tar.gz Using file tar command:

tar -zxvf cmake-3.15.2.tar.gz

Navigate to the extracted directory using cd Commands such as:

cd cmake-3.15.2

Next run bootstrap The file to bootstrap cmake Enter the following command in a terminal:


Run make command:


install cmake using make The following command:

sudo make install

Confirm installation

Next, check the installation, cmake Version to enter the following command in terminal:

cmake --version


You learned how to install CMake on Ubuntu 18.04. If you have any questions about this, don’t forget to comment below.