Categories: UbuntuUbuntu Feed

How to Install Git on Ubuntu 20.04

The Ubuntu 20.04 default apt repositories contains git packages. You can install git packages directly from the default git repositories. But they may not have the latest version of git client.

Git core team also maintains a PPA with latest git debian packages. You can add this ppa to your system and install the latest git on your system.

This tutorial will help you to install Git on Ubuntu 20.04 LTS Linux system.

Install Git on Ubuntu 20.04

Use the following steps to install Git on Ubuntu Linux system.

  1. Install the software-properties-common package on your system, which contains add-apt-repository command
    sudo apt install software-properties-common -y 
    
  2. Sponsored
  3. Add the PPA to your system using the following command.
    sudo add-apt-repository ppa:git-core/ppa 
    
  4. Next, install git debian package on your system
    sudo apt install git -y
    

That’s it, Git has been installed on your Ubuntu system.

Setup Git

Setup the Git user details on your machine, which is used as your identity by the Github or other repository providers.

Sponsored

To setup username and email address system wide, execute the following command. Make sure to change your name and email address with yours.

git config --gloabl user.name "Rahul Kumar"
git config --gloabl user.email "rahul@example.com"

To configure identity for specific repository, remove --global from above command and run from your repository directory.

Conclusion

This tutorial explained how to install latest Git on Ubuntu 18.04 LTS Linux system via command line.

The post How to Install Git on Ubuntu 20.04 appeared first on TecAdmin.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

3 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

4 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

5 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

5 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago