How To Install Git on Ubuntu 22.04 LTS Jammy Jellyfish Linux

Git is a versioning control system, mainly used by programmers to issue changes to applications and keep track of the revisions. However, it’s also commonly used by everyday users, since they’re able to browse and download the source code and binaries of millions of applications from websites like GitHub and GitLab.

On Linux, familiarity with Git and access to the command line utility is borderline essential. That is, if you’re the type of user who likes to install programs to unlock additional features and the like.

In this guide, we’ll show you the step by step instructions to install Git on Ubuntu 22.04 Jammy Jellyfish Linux. Once it’s installed, we’ll show you the basics on how to get started configuring and using Git.

In this tutorial you will learn:

  • How to install Git
  • How to set global username
  • How to set global email
  • How to check git version
Git on Ubuntu 22.04 LTS Jammy Jellyfish Linux
Git on Ubuntu 22.04 LTS Jammy Jellyfish Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 22.04 Jammy Jellyfish
Software Git
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How To Install Git on Ubuntu 22.04 step by step instructions



  1. The first step is to open a command line terminal and install Git by using the below apt commands:
    $ sudo apt update
    $ sudo apt install git
    
  2. Confirm the git installation by checking for a git version:
    $ git --version
    
  3. Set your global user name and email. Example:
    $ git config --global user.name "Lubos Rendek"
    $ git config --global user.email "web@linuxconfig.org"
    

    Alternatively, set your configuration directly by editing the ~/.gitconfig file:

    [user]
            name = Lubos Rendek
            email = web@linuxconfig.org
  4. List global git settings to confirm your git configuration:
    $ git config --list
    

Closing Thoughts

In this tutorial, you saw how to install Git on Ubuntu 22.04 Jammy Jellyfish. Once it’s installed, there’s some short configuration you’ll need to do, then you can get started with creating your own repositories, or cloning those that already exist. Our Git tutorial for beginners has all the instructions you’ll need.