How To Install Git on Linux

Mert Ilis
Oct 16, 2020

Brief notes on how to install Git on various Linux Distributions

Installing Git on CentOS 8

First, update the CentOS local package index (it might take a while):

sudo dnf update -y

Then, install git with the following command:

sudo dnf install git -y

You can verify git installation by checking the version:

git — version

Installing Git on Ubuntu 20.04

Git is normally included in the default packages of Ubuntu. However, for any reason, you can install Git with the following commands:

First, update the Ubuntu local package index:

sudo apt update

Then, install git with the following command:

sudo apt install git

You can verify git installation by checking the version:

git — version

Hope it helps!

--

--

Mert Ilis

I’m a software development enthusiast who likes trying different web technologies and adding value to his team.