Howtodojo logo
  • Home 
  • About 
  • Certifications 
  • Sample Database 
  • Cheatsheet 
  • Glossary 
  • Blog 
  • Tags 
  1.   Blog
  1. Home
  2. Blog
  3. How To Install Git on Ubuntu 16.04

How To Install Git on Ubuntu 16.04

Share via
Howtodojo
Link copied to clipboard

In this tutorial we will learn how to install git on Ubuntu 16.04 (Xenial Xerus).

On this page
Overview   Install Git on Ubuntu 16.04 from repository   Summary  
How To Install Git on Ubuntu 16.04

Overview  

In this tutorial we will learn how to install git on Ubuntu 16.04 (Xenial Xerus).

Git is a free and open source distributed version control system (VCS) designed to handle all project from small to large with speed and efficiency.

Originally created by Linus Torvalds in 2005 and maintained by Junio Hamano since July 2005. It’s used by many open source projects like the Linux kernel, KDE, Eclipse, PostgreSQL and Qt.

Git also being used by large companies including but not limited to Google, Facebook, Microsoft, Linkedin, Netflix and Twitter.

You can visit git website to learn more about git usage.

Let’s start installing git on Ubuntu 16.04.

Install Git on Ubuntu 16.04 from repository  

Ubuntu 16.04 already shipped with git version 2.7.4. Let’s install git from repository.

Update repository metadata using command below

sudo apt-get update
```bash

Now let's install git

```bash
sudo apt-get install git

Press Y to continue.

Check installed git version

$ git version
git version 2.7.4
```bash

## Install Git from PPA repository

If we check on git website, at the time of this writing the latest stable version of git is 2.13.3.

We can install the latest stable git from [git core PPA repository][4].

Add git-core PPA repository

```bash
$ sudo add-apt-repository ppa:git-core/ppa
 The most current stable version of Git for Ubuntu.

For release candidates, go to https://launchpad.net/~git-core/+archive/candidate .
 More info: https://launchpad.net/~git-core/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

Press ENTER

gpg: keyring `/tmp/tmpb_shleu6/secring.gpg' created
gpg: keyring `/tmp/tmpb_shleu6/pubring.gpg' created
gpg: requesting key E1DF1F24 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpb_shleu6/trustdb.gpg: trustdb created
gpg: key E1DF1F24: public key "Launchpad PPA for Ubuntu Git Maintainers" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
```bash

Update apt-get metadata by running command below

```bash
sudo apt-get update

Install git

sudo apt-get install git
```bash

Now when we check git version

```bash
$ git version
git version 2.13.0

We already use the latest version of git installed.

Summary  

In this tutorial we learned how to install git from Ubuntu repository on Ubuntu 16.04 and also latest version of git from git-core PPA repository.

Now you can start using git to version control your source code, configuration, or any work that you plan to use version on.

 How to Install Java 8 on Ubuntu 16.04
How To Install Git on CentOS 6 
On this page:
Overview   Install Git on Ubuntu 16.04 from repository   Summary  
Follow me

We publish tutorials, tips and tricks about Linux, open source, cloud computing, and infrastructure

     
Copyright © 2012 - 2025 howtodojo.com. |
Howtodojo
Code copied to clipboard