DEV Community

Rezky Aulia Pratama
Rezky Aulia Pratama

Posted on • Updated on

Easy way to install GIT in Linux

Prerequisites :

  • You know how to use Linux terminal
  • Ubuntu 20.04
  • Centos 7
  • sudo is optional, use it when required.

In this article, I will explain to you on how to install GIT in Ubuntu and Centos using package manager.

Ubuntu 20.04

First, you need to update your ubuntu package manager
sudo apt-get update

And then, install git with execute command
sudo apt-get install git

After the process of installation finish, verify if GIT is successful installed in your machine by checking it version
git --version
If it return value like the picture below, GIT successful installed.

GIT version

Centos 7

First, Update package manager in your centos system

sudo yum update
Enter fullscreen mode Exit fullscreen mode

After that, install GIT by executing the following command (it’ll take some time and need your action to continue the process)

sudo yum install git
Enter fullscreen mode Exit fullscreen mode

When the above process is done, verify if GIT is already installed in your machine by checking it version

git --version
Enter fullscreen mode Exit fullscreen mode

The result should look like this:

GIT version


🎉  thats all, now you can use GIT in your machine.

Latest comments (0)