Skip to content
  • Homepage
  • HTML
  • CSS
  • Symfony
  • PHP
  • How to
  • Contact
  • Donate

Teach Developer

Articles, Guides & Tips

How to install Git on Linux

Home  »  How to • Linux   »   How to install Git on Linux
Posted on September 1, 2022September 17, 2022
602

Linux is a popular and as well as widely used operating system. The installation of Git on Linux is quite simpler when compared to other platforms. However, one has to use the right package manager for Linux distribution.
We will proceed with this tutorial to see how to install and set up Git on various distributions of Linux operation systems.

For Debian/Ubuntu

You will run the following command on the shell/terminal to install Git in Linux.

sudo apt-get install git

Now, confirm whether Git was successfully installed, use the to —
version command:

git --version

For Fedora, CentOS and RHEL

You will run the command below from the shell/terminal:

$ sudo dnf install git

But, in case you are using an older version then use yum instead of dnf:

$ sudo yum install git

For OpenSUSE

You will open the shell and run the command below to install Git on OpenSUSE:

$ sudo zypper install git

For Arch and its derivatives

You will run the pacman command below in the shell to install Git:

$ sudo pacman -S git

Thus, if the command above displays the Git version as shown below, then Git was
successfully installed.

$ git --version
How to, Linux

Post navigation

Previous Post: How to create the first Git Repository
Next Post: How to clear your cache in npm

Related Posts

  • How to use events listeners and Event Subscriber in Symfony
  • How to trigger a button click from another button click event with JavaScript?
  • How to Reverse A String with JavaScript
  • How to check if a customer is logged in to Magento 2 or not?
  • How to Change SSH Port in Linux
  • How to Create Live Search in HTML table with jQuery

Categories

  • Codeigniter (3)
  • CSS (11)
  • eCommerce (1)
  • Framework (1)
  • Git (3)
  • How to (43)
  • HTML (5)
  • JavaScript (15)
  • Jquery (7)
  • Laravel (1)
  • Linux (4)
  • Magento-2 (1)
  • Node js (4)
  • Others (2)
  • PHP (11)
  • React (13)
  • Server (1)
  • SSH (3)
  • Symfony (6)
  • Tips (16)
  • Top Tutorials (10)
  • Ubuntu (3)
  • Vue (1)
  • Wordpress (7)

Latest Posts

  • What is SSH in Linux?
  • How to Delete Files in Ubuntu Command Line
  • How to Deploy a React application on a cPanel
  • How to use events listeners and Event Subscriber in Symfony
  • How to Convert PHP CSV to JSON

WEEKLY TAGS

AJAX (1) Codeigniter (1) Javascript (11) JQuery (1) PHP (16) Programming (1) React (3) Symfony (1)

Random Post

Best Practical CSS Tips
How to Deploy a React application on a cPanel
How to PHP Get Max Value From Array
How to Object Destructuring in ES6
How to trigger a button click from another button click event with JavaScript?

Quick Navigation

  • About
  • Contact
  • Privacy Policy

© Teach Developer 2021. All rights reserved