DEV Community

Cover image for Install Git on Linux

Posted on • Updated on

Install Git on Linux

In the last two parts of these series, we studied in detail, how to install git on Windows operating system and Mac.

Herein, we'll get up and running with git on Linux.

Installation of the basic Git tools on Linux can be done via a binary installer, you can generally do so through the package management tool that comes with your distribution. If you’re on Fedora (or any closely-related RPM-based distribution, such as RHEL or CentOS), you can use dnf:

`sudo dnf install git-all


If you're a Debian-based system such as Ubuntu, you can use apt, the default package manager.

sudo apt install git-all

If you are not sure which distro your machine πŸ’» is,

  1. Search for terminal
  2. Launch the terminal
  3. Enter the following command in your terminal bash git --version . This will prompt for installation of git and provide you with command to do this. 4. Type in the command provided in step 3 above. That should get you up and running with git.

To verify your installation, run

git --version

This should give return the version of git currently installed on your machine
verify git installation

Top comments (0)