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
|Category||Requirements, Conventions or Software Version Used|
|System||Ubuntu 22.04 Jammy Jellyfish|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – 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
- The first step is to open a command line terminal and install Git by using the below
$ sudo apt update $ sudo apt install git
- Confirm the git installation by checking for a git version:
$ git --version
- Set your global user name and email. Example:
$ git config --global user.name "Lubos Rendek" $ git config --global user.email "email@example.com"
Alternatively, set your configuration directly by editing the
[user] name = Lubos Rendek email = firstname.lastname@example.org
- List global git settings to confirm your git configuration:
$ git config --list
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.