DropVPS Team
Writer: John hens
how to install git on ubuntu 25.04 , 24.04 or 22.04

Table of Contents
What you will read?
Git is the most popular version control system used by developers worldwide. Installing Git on Ubuntu is simple, and the steps are almost identical across versions 25.04, 24.04, and 22.04.
Step 1: Update Package Index
Before installing Git, make sure your system package index is updated so you get the latest version available in the repositories:
sudo apt update
sudo apt upgrade -y
Step 2: Install Git
Install Git from the official Ubuntu repositories using:
sudo apt install git -y
After installation, verify it by checking the version:
git --version
Step 3: Configure Git User Information
To start using Git, configure your username and email address. These details will be attached to your commits:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Check the settings with:
git config --list
Step 4: Test Git Installation
Create a test directory and initialize Git to confirm everything works:
mkdir test-git
cd test-git
git init
If you see the message Initialized empty Git repository, Git is successfully installed.