This article is a quick guide on how to install git on different Linux distributions like Ubuntu, Fedora, Arch, etc.

Git is an open-source, cross-platform version control system. It is used to track and maintain changes for a set of files. The tool is mainly popular with programmers for their projects. However, the tool can also be used for any sort of scenario that requires changes to files from time to time.

Git was developed by Linus Torvalds in 2005 to manage the Linux kernel development.

Installing git on different Linux distributions

As Git is a very essential and popular tool, it is available on almost all the official repositories of different Linux distributions. So you can easily execute the installation command to get it.

For Ubuntu, Debian, and their derivatives.

sudo apt-get install git

If you want to get the latest one then simply add the project repository.

sudo add-apt-repository ppa:git-core/ppa 
sudo apt-get update
sudo apt-get install git

For Fedora, CentOS, Oracle, Scientific & RHEL

sudo dnf install git

In case the dnf command is not found in the system, then you can install that as well.

sudo yum install dnf

For Arch, Manjaro & derivatives

sudo pacman -S git

For OpenSUSE

sudo zypper install git

Gentoo Linux

sudo emerge --ask --verbose dev-vcs/gitsudo pacman -S git

Mageia Linux

sudo urpmi git

Note: If you are not getting the latest version of the git then use the application tarfile and build it from the source code to install it.

Download Git tarfile

For more, check out installation guide: Installing applications in Linux | Complete guide

Watch Video guide on YouTube

Additionally, You can also watch a step-by-step video guide on YouTube to get a better understanding of it.

Conclusion

So is the guide on how to install the latest git on Linux distributions. Let me know what you think about it in the comments and subscribe to the LinuxH2O Youtube channel. Till then, keep enjoying Linux.