Angelo
Angelo
I am Angelo. A systems engineer passionate about Linux and all open-source software. Although here I'm just another member of the family.

How To Install Git on CentOS 9 Stream

Hello, friends. In this short post, you will learn how to install Git on CentOS 9 Stream.

Introduction

Git is an open source, cross-platform distributed version control system (DVCS) that was initially developed by Linus Torvalds in 2005. Believe it or not, there are a staggering number of software projects that rely on Git for version control, including commercial and open-source projects.

This makes Git a must for every developer and professional involved in the software lifecycle.

So, it’s not too complex to install Git on Linux, and today we’re going to demonstrate it for you.

Installing Git on CentOS 9 Stream

There are two ways to install Git. The first is to install it from the official CentOS repositories.

- Advertisement -

To achieve this, open a terminal and update your system

sudo dnf update

And then, install Git with the command

sudo dnf install git

Then, you can check the installed version with the command

- Advertisement -
git --version
1.- Git on CentOS 9 Stream
1.- Git on CentOS 9 Stream

But if you want to have the latest stable version, then the best thing to do is to compile the Git source code. To achieve this, install wget and the basic packages to compile.

sudo dnf install wget tar gettext-devel curl-devel expat-devel expat-devel openssl-devel perl-CPAN perl-devel zlib-devel unzip cmake gcc make

Then download the latest version of the git code.

wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.36.0.tar.gz

Then unzip it

tar xvzf git-2.36.0.tar.gz

Thereafter, navigate to the generated folder

cd git-2.36.0

Next, compile the code.

sudo make prefix=/usr/local all

Finally, install git

sudo make prefix=/usr/local install

And check the version

git --version

Conclusion

Thanks to this post, you learned how to install Git on CentOS 9 Stream, which is a system that still has a lot to give.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook