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
882

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 clear your cache in npm
  • How to Recover Deleted WhatsApp Messages
  • Enable or Disable SSH Root Login Access in Linux
  • How to Delete Unused Database Tables in WordPress
  • How to Send Email from Localhost in PHP
  • Here are 10 platforms where you can find your next remote job as a developer.

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

How to check if a customer is logged in to Magento 2 or not?
How to fix getFullyear() is not a function with JavaScript?
What is SSH in Linux?
Common Mistakes with Conditionals
PHP 8: Attributes

Quick Navigation

  • About
  • Contact
  • Privacy Policy

© Teach Developer 2021. All rights reserved