26.8 C
Senior Writer and partner

How to install Git on Ubuntu 18.04 / Linux Mint 19?

Developers must use all available tools to make quality software. Some of these tools do not go directly to the software or the code but to its management. For example, version control is important to ensure that changes are made to the code in an orderly fashion. In this segment, Git seems to be the most logical alternative for this task. So in this post, we will show you how to install Git on Ubuntu 18.04 and Linux Mint 19.

Git is a free and open source distributed version control system. It is perhaps the most popular within the branch as millions of developers use it to control software versions. Ease of use, community support, and efficient version control are the main features of Git. In addition, it is open source and free, which makes it ideal for all projects.

Of course, Git is available for almost any Linux distribution. It also has versions for Windows or MacOS. So no matter what platform you develop on, you will always have the advantages of using Git.

Install Git on Ubuntu 18.04 / Linux Mint 19

As I mentioned earlier, Git is available for many Linux distributions. And Ubuntu is no exception. For Ubuntu and Linux Mint we have two different ways to install Git.

- Advertisement -

First, Git is in the official Ubuntu and Linux Mint repositories. However, the available version is somewhat outdated and the development of Git is quite active. Installing Git in this way is quite simple but will deprive you of having the latest version available with all its advantages.

So, open a terminal and run:

:~$ sudo apt install git

1.- Install Git from the main repositories
1.- Install Git from the main repositories

Then, check the installed version.

:~$ git --version

2.- Git version
2.- Git version

As we can see, the version that is in the official repositories is 2.17. However, the latest version available is 2.21 at the time of writing this post.

Fortunately, there is a PPA for Ubuntu and Linux Mint that we can use to install the latest version of Git very easily.

So, open a terminal and run:

:~$ sudo add-apt-repository ppa:git-core/ppa

3.- Adding the external repository
3.- Adding the external repository

Then, refresh the APT cache.

:~$ sudo apt update

If you already have it installed, run this command.

:~$ sudo apt upgrade

Or, if you do not have it installed.

:~$ sudo apt install git

After that, check the installed version.

:~$ git --version

4.- Git latest version installed
4.- Git latest version installed

So we can install Git on Ubuntu 18.04 and Linux Mint 19 using the PPA of the development team.


Git is quite a reference when it comes to version control. Many developers use it for their daily work and offer a great guarantee for it. In addition, installing it is quite simple and is within everyone’s reach.

Please share this post with your friends.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"


  1. With both the version in the Ubuntu repos and the version newly installed via the ppa above I get the same error:

    $ git –version
    git: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory

    This sounds like there is a dependency problem with the package.
    I have Linux Mint 19.1

    $ locate libcrypto.so.1.0.0

    When I use ldd on the git binary, I get:

    $ ldd /usr/bin/git
    linux-vdso.so.1 (0x00007fff7d9b8000)
    libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fef71762000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fef71545000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fef71326000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fef7111e000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fef70d2d000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fef71f25000)

    and “locate linux-vdso.so.1” generates a blank.


Please enter your comment!
Please enter your name here

Latest article