Installation

Installing Git on Linux involves different steps for each Linux Distribution. Here’s a guide for each distro:

Arch

  • Open the Terminal
  • Run the following command:
    sudo pacman -S git
    

Debian

  • Open the Terminal
  • Run the following commands:
    sudo apt install git
    

Fedora

(Fedora 22 and later)

  • Open the Terminal
  • Run the following command:
    sudo dnf install git 
    

Ubuntu

For Ubuntu, this PPA provides the latest stable upstream Git version

  • To add PPA open the Terminal & Run the following commands:
    add-apt-repository ppa:git-core/ppa
    
  • Run the following commands:
    sudo apt update && sudo apt upgrade -y && sudo apt install git -y
    

Verify the Installation

After installing Git, you can verify the installation by running this command in the terminal. This should display the installed Git version.

git version

References