How to Install and Configure Git on Ubuntu 20.04

Git is an open-source and freely available distributed version control system that can manage small to large projects fast and efficiently. It is very easy to use, lightning-fast, and has the best performance. It tracks all the changes made from time to time in a source code of development of software tools. Linus Torvalds in 2005 created Git for the Linux kernel system.

Installing Git from Ubuntu Software APT

It is a recommended method to install the Git system from the Ubuntu Software repository.

Step 1:

As always, first, update and upgrade your APT.

$ sudo apt update

$ sudo apt upgrade

Step 2:

The Git utility package is, by default, included in ubuntu’s software repositories that can be installed via APT. Just enter the following command to download and install Git.

$ sudo apt install git

Git requires root/sudo privileges to be installed so, enter the password to continue the installation.

Step 3:

When Git gets installed, you can check its verification with the following command

$ git –version

Configuring Git

You can configure Git through the terminal/command-line window. It requires a global username that acts as a commit name and an email address.

Step 1:

Enter the following command to set a username, replace the content inside the “Younis said” with your name.

$ git config --global “Younis said”

Step 2:

Enter the following command to set a global user email, replace the content inside the “[email protected]” with your user email.

$ git config –global “”

Step 3:

Lastly, check for the changes you just made by using the following command. It lists out the changes made to the Git configuration file.

$ git config --list

Step 4 (optional):

You can also edit these settings any time for that you have to change it via “git config command” in the terminal window.

$ git config


Git is very easy to install on Ubuntu, just needs 4 commands to install and configure it. You just need an APT command to download and install the stable version from the Ubuntu repository

About the author

Younis Said

I am a freelancing software project developer, a software engineering graduate and a content writer. I love working with Linux and open-source software.