How to Install GIT on Linux
Git, the backbone of modern software development, is essential for version control in any professional environment. Many Linux distributions include Git by default, like Fedora, Arch Linux, openSUSE, Kali Linux, and Ubuntu Server. But sometimes organizations often require specific versions or configurations.
This article will walk you through installing GIT on Linux. In addition to this, you'll also be able to create a new repository in GitHub.
Table of Content
What is Git?
Git is an open-source version control system designed to build a community of developers to cordinate and develop projects. As a developer, you can create branches of the source codes available on Git. Git offers a ton of features to make it an efficient version control system to manage projects.
How to Use Git?
Set up a Git install process is the same on every operating system, so first run the following commands to set up your name and email ID:
git config --global user.name "Your Name"git config --global user.email "your.email@example.com"
You can create any repository through the mkdir command. For example, let's create a "first_repo" repository through the following command:
mkdir first_repo
Now you can add the codes in the created Github repository.
Now let's look at the methods to download Git and Use Git in Linux/Windows/macOS.
Steps to Download and Install Git on Linux
To download Git on Linux, and install it on any utility in Linux, updating the system to the latest one is essential. Hence, please run the following GIT commands one by one:
Git Installation Commands For Ubuntu
Following are 2 simple steps to get Git in Ubuntu
Step 1: Update the System
- Run these commands to update your system’s package list and install the latest versions of packages.
sudo apt update
sudo apt upgrade
Step 2: Finish the Git Installation
- Use this command to install Git along with additional packages.

sudo apt install git-all
Step 3: Verify Installation
- Use the below command to varify the installation of Git in Ubuntu.

git --version
Git Installation Command For Fedora
Following are 2 simple steps to get Git in Fedora
Step 1: Install the Latest Version
Run these commands to update your system’s package list and install the latest versions of packages.
sudo dnf update
sudo dnf upgrade
Step 2: Complete the Git Installation
Use this command to install Git along with additional packages.
sudo dnf install git-all
Step 3: Verify Installation
- Use the below command to varify the installation of Git in Fedora
git --version
Git Command For CentOS/RHEL
Following are 2 simple steps to get Git for CentOS/RHEL
Step 1: Update the System
- Run these commands to update your system’s package list and install the latest versions of packages.
sudo yum update
sudo yum upgrade
Step 2: Install Git on CentOS/RHEL
- Use this command to install Git along with additional packages.
sudo yum install git-all
Step 3: Verify Installation
- After download Git, you check its version using by running the below git version command:
git --version

Checking the Git version
By following these steps, you will successfully download and install Git on your Linux system, whether you’re using Ubuntu, Fedora, or CentOS/RHEL.
Conclusion
Installing Git for Windows and other OS will enable users to create Git repository, as mentioned above is a very straightforward process. Besides this, once you install GIT, you can efficiently manage your projects, collaborate with others, and maintain the integrity of your codebase across all platforms.