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. Add the PPA to your system using the following command.
    sudo add-apt-repository ppa:git-core/ppa 
    
  3. 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.

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

How to build DORA-ready infrastructure with verifiable provenance and reliable support

The Digital Operational Resilience Act (DORA) came into force across the EU on January 17,…

16 hours ago

Claude on Incus – All the autonomy, securely

Here's claude-on-incus (or coi for short) - a tool for running Claude Code freely in…

20 hours ago

Deploy your Spring Boot application to production

In a previous article, we covered how easy it is to create Spring Boot containers…

2 days ago

Minimal Ubuntu Pro: lean images backed by enterprise-grade security

Deploy Minimal Ubuntu Pro across AWS, Azure, and Google Cloud The security landscape is growing…

3 days ago

Ubuntu 26.04 Will Be Known as ‘Resolute Raccoon’

Canonical has announced “Resolute Raccoon” as the codename for its next Long-Term Support (LTS) release,…

5 days ago

London called, and the world answered: creating a Summit without borders

When we announced that the Ubuntu Summit 25.10 would be a remote event, we knew…

6 days ago