DEV Community

Cover image for How to Install Git On Ubuntu 20.04
Suresh Ramani
Suresh Ramani

Posted on • Originally published at techvblogs.com

4

How to Install Git On Ubuntu 20.04

Introduction

Git is the world's most popular distributed version control system used by many open-source and commercial projects. It allows you to collaborate on projects with your fellow developers, keep track of your code changes, revert to previous stages, create branches, and more. Linus Torvalds (the creator of Linux) developed Git.

A version control system is a system that keeps a record of the changes in a file (or multiple files) over a period. This is so that a user may return to a previous version of the system's software whenever necessary. This article shows you how to install and configure Git in Ubuntu 20.04 LTS.

In this article, you will learn how to install and configure Git on Ubuntu 20.04 via the Command line.

1. Prerequisites

  1. The operating system running Ubuntu 20.04 Linux
  2. A root or non-root user with Sudo privileges
  3. Has stable internet connection
  4. Terminal window / Command line

2. Update Local Repositories

Update all system packages to the latest, Run the following command:

sudo apt-get upadate
sudo apt-get upgrade -y
Enter fullscreen mode Exit fullscreen mode

3. Install GIT

The Git utility package is available in ubuntu software sources, which can be installed by APT-GET. Run the following command:

sudo apt-get install git
Enter fullscreen mode Exit fullscreen mode

4. Check GIT Version

Verify the installation, run the following command:

git --version
Enter fullscreen mode Exit fullscreen mode

That’s it, you have successfully installed Git on your Ubuntu, and you can start using it.

5. Configure GIT

Set your global user name and email. Run the following command:

git config --global user.name "<YOUR NAME>"
git config --global user.email "<YOUR EMAIL ADDRESS>"
Enter fullscreen mode Exit fullscreen mode

Thank you for reading this blog.

Heroku

Deliver your unique apps, your own way.

Heroku tackles the toil — patching and upgrading, 24/7 ops and security, build systems, failovers, and more. Stay focused on building great data-driven applications.

Learn More

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Explore this insightful post in the vibrant DEV Community. Developers from all walks of life are invited to contribute and elevate our shared know-how.

A simple "thank you" could lift spirits—leave your kudos in the comments!

On DEV, passing on wisdom paves our way and unites us. Enjoyed this piece? A brief note of thanks to the writer goes a long way.

Okay