• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Install Git on Ubuntu 20.04 (Focal Fossa)

Written by Admin, Updated On May 3, 2020
git, ubuntu
How to Install Git on Ubuntu 20.04

Git is one of the most popular version control systems currently available. It provides facility to track changes in source code for many open source and commercial projects. Version control systems help you share and collaborate on software development projects. In this tutorial explains how to install Git on Ubuntu 20.04 Focal Fossa.

Install Git on Ubuntu#

Ubuntu includes Git package in default Ubuntu repositories. It’s very simple and straightforward to install Git using apt package manager on Ubuntu.

Step 1 – Update Default Packages#

First, update your default packages. Make sure you are logged in as a root or user with sudo privileges.

sudo apt update

Step 2 – Install Git#

Run the below command to install Git:

sudo apt install git

Step 3 – Verify Installation#

Verify the installation by running the following command which will show the Git version:

git --version
git version 2.25.1

Currently, in Ubuntu repositories latest git version is 2.25.1. It may vary while you are installing.

Step 4 – Configure Git#

At this point, you have Git installed and to prevent warnings, you should configure it by setting up email address and username:

git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"

Don’t forget to replace with your real name and email address.

You can check entered details by typing:

git config --list
user.name=Your Name
user.email=youremail@example.com

These settings are stored at ~/.gitconfig file and you can see content as below:

You can make other git configuration changes by using git config command or you can use text editor to make changes to ~/.gitconfig file manually.

Conclusion#

In this guide, we show you how to install Git on Ubuntu 20.04 Focal Fossa. You can get more details about use of Git from Pro Git book.

Feel free to comment below, if any question or suggestion.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article How to Install Pip on CentOS 8
Next Article   How to Install Python on CentOS 8 / CentOS 7

Related Posts

  • How to Install Php 8 on Ubuntu 20.04

    How to Install PHP 8 on Ubuntu 20.04

    December 28, 2020
  • How to Install GIMP on Ubuntu 20.04

    How to Install GIMP 2.10 on Ubuntu 20.04

    December 22, 2020
  • How to Install Python 3.9 on Ubuntu 20.04

    How to Install Python 3.9 on Ubuntu 20.04

    December 21, 2020

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on Ubuntu 20.04
    How to Install Python 3.9 on Ubuntu 20.04 December 21, 2020
  • How to Install GIMP on Ubuntu 20.04
    How to Install GIMP 2.10 on Ubuntu 20.04 December 22, 2020
  • How to Install Python 3.9 on Debian 10
    How to Install Python 3.9 on Debian 10 December 25, 2020
  • How to Install Notepad++ on Ubuntu 20.04
    How to Install Notepad++ on Ubuntu 20.04 December 19, 2020
  • How to Install Notepad++ on Debian 10
    How to Install Notepad++ on Debian 10 December 23, 2020
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook