How to Install CMake on Ubuntu 20.04

Table of Contents

How to Install CMake on Ubuntu 20.04


The CMake project is an open-source, cross-platform program that builds automation, testing, packaging, and installing software in a compiler-independent way. CMake isn’t a build system; it helps generate build files for another system. CMake is unique compared to other build tools. Making and building makefiles is possible, but you can also tell CMake to create a visual studio solution instead. For external programs, you have the same option. They are the choice of the maintainer of the library you use, and there are no standards for things like code generation.


We will now look at how to install CMake on Ubuntu 20.



Step 1: Configure the VPSie cloud server



  1. Sign in to your system or register a newly created one by logging in to your VPSie account
  2. Connect by SSH using the credentials we emailed you.
  3. Once you have logged into your Ubuntu instance, run these commands to update your system.
# apt-get update && apt-get upgrade -y



Step 2: Install build tools and libraries



Run the following command to install this,



# sudo apt-get install build-essential libssl-dev



Step 3: Install CMake


The first step is to navigate to the temp directory:


# cd /tmp


To obtain the source code, type the following command:


# wget


Run the following command to extract it:


# tar -zxvf cmake-3.20.0.tar.gz


After that, move to the extracted folder as follows:


# cd cmake-3.20.0


Install CMake with the following commands:




Once bootstrapped, run the following command:


# make


Installation is as follows:


# sudo make install


Step 4: Check the installation


Execute the following command:


# cmake --version



Your system is now running Cmake, and you can use it now. Thanks for reading! I hope it was informative for you! 




SSH Key Authentication in your Linux VPS Server

CMake is an open-source build system that helps developers manage the build process of software projects. It is used to generate build files for various platforms and compilers, making it easier to build and deploy software across different systems.

To install CMake on Ubuntu, you can use the apt package manager. Simply open a terminal and run the command sudo apt-get update to update the package lists, then run the command sudo apt-get install cmake to install CMake.

To check if CMake is installed on your system, you can run the command cmake --version in a terminal. If CMake is installed, the version number will be displayed.

To uninstall CMake from your system, you can run the command sudo apt-get remove cmake in a terminal. This will remove CMake from your system, but it will not remove any files or directories created by CMake during the build process.

Yes, you can install a specific version of CMake by downloading the source code from the CMake website and building it from source. Alternatively, you can use a package manager like apt or yum to install a specific version of CMake.

Share on
VPSie Cloud service

Unlock Your

20% Discount

The First 3 orders get 20% discount! Try Sign up on VPSie to get a chance to get the discount.