How to install CMake

CMake is easy to install in Ubuntu using apt:

$ sudo apt install cmake

However, depending on your version of Ubuntu, the CMake version that is installed might be very old. So, you might run into problems when you build projects that use features from more recent versions of CMake.

CMake provides binary versions for Linux x86_64. Installing the latest version of CMake from these packages is easy:

  • Remove the Ubuntu version of CMake:
$ sudo apt remove cmake cmake-data
  • Download the .sh binary package of the CMake version you want from here. When I downloaded, I got

  • Move the downloaded package to /opt and execute it:

$ sudo mv /opt
$ cd /opt
$ sudo chmod +x
$ sudo bash ./

This installs this version of CMake in the directory /opt/cmake-3.14.0-Linux-x86_64.

  • Create symbolic links for the CMake binaries:
$ sudo ln -s /opt/* /usr/local/bin

$ Test if CMake is working:

$ cmake --version
cmake version 3.14.0

CMake suite maintained and supported by Kitware (

Tried with: Ubuntu 18.04


How to install PDFTK

PDFTK is a tool that can be used to split and merge PDF files. It is available for both Linux and Windows.


PDFTK installer for Windows can be downloaded here. After PDFTK is installed, ensure that the directory of pdftk.exe is in the PATH environment variable.

Ubuntu 18.04 and newer

For Ubuntu versions starting from 18.04 and newer versions, use Snap to install PDFTK:

$ sudo snap install pdftk

Ubuntu 16.04 and older

For Ubuntu versions 16.04 and older versions, use Apt to install PDFTK:

$ sudo apt install pdftk

If your installation is successful, you should be able to run pdftk from the shell.

How to install and uninstall Python package from source

A lot of Python packages are only available as source code.


To install such a Python package, use its file:

$ sudo python install

This will install the Python files to a central location such as /usr/local/lib. If you do not have such permissions or want to install to a user-local location then try this:

  • Create a directory, say /home/joe/python_libs/lib/python in your home directory to host local Python packages.
  • Set the above path in the PYTHONPATH environment variable.
  • Install the package by passing the above path to the --home parameter:
$ python install --home /home/joe/python_libs


To uninstall a package is tricky.

One solution is to find out where the files were installed and then use that list to remove those files:

$ sudo python install --record install-files.txt
$ cat install-files.txt | sudo xargs rm -rf

Another solution is to just locate the installation directory, like /usr/local/lib/python2.7/dist-packages for example and delete the directory of the package.

Tried with: Python 2.7.6 and Ubuntu 14.04

How to list installed programs at commandline in Windows

To list all the installed programs at the commandline in Windows, use this command: wmic product

A lot of parameters are listed for every product. Some of the parameters are: name, description, URL, telephone number (not kidding!), ID, installed date, installed directory, source directory from which it was installed, language, name of installer file, vendor and version.

With so many parameters, the output for each prorgram simply cannot fit on a single line. So, it is better to redirect it to a file: wmic product > proglist.txt

Tried with: Windows 7 x64

How to install a package from Ubuntu repositories

Installing a package from the Ubuntu repositories is easy. There are three ways to do it.

You can use the Ubuntu Software Center. Open it, search for the package name and install it.

You can use the Synaptic program. You may have to install it, if it is not already there. Open it, search the package name, mark it for installation and choose Apply.

If you like the terminal, use the apt-get program. For example, to install a package named Foo:

$ sudo apt-get install Foo

Tried with: Ubuntu 12.04.1 LTS