How To Install Git on Ubuntu Linux

Install Git on Ubuntu Linux Techhyme

Git is a popular, free Version Control System, designed for use by software developers. The essence of Version Control is the ability to capture the state of software documents, and in doing so make it possible to revert to a previous state if required.

In this tutorial, we’ll show you the step by step instructions to install Git on Ubuntu Linux.

The first step is to download and install Git. Git is entirely free, and can run on machines using Windows, Mac and Linux operating systems. Based on your operating system, the specific process to install Git will vary slightly.

So open a command line terminal and enter apt update, and press the Enter key. If there are updates, you’ll see an output similar to below screen:

Install Git Ubuntu Techhyme

To install Git, run the following command:

Command: apt install git

Install Git Ubuntu Techhyme

To confirm the git installation, you can use the following command for checking the git version:

Command: git –version

Install Git Ubuntu Techhyme

So now you have your command line open, it’s time to begin using Git. However, before Git will allow you to interact with it on any project, you must set up two very simple configuration options:

You will identify yourself within Git by adding your name and an email address. Set your global user name and email by using the below commands:

Command: git config –global “Tech Hyme”
Command: git config –global “”

Once you’ve entered the required commands, you’ll need to press Enter to run them.

Install Git Ubuntu Techhyme

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

name = Tech Hyme
email =

Install Git Ubuntu Techhyme

You can also confirm your git configurations with the help of –list attribute

Command: git config –list

Install Git Ubuntu Techhyme

Once you’re done, save your project. Now let’s return to the command line tool and tell Git to start tracking the history of this new file.

Command: git add yourproject.txt

Don’t expect any feedback at this stage. Git has happily accepted your command and executed it instantly. Git now knows that you are going to track the progress of this file.

Let’s capture the current state of this file for all time by performing our first commit.

Command: git commit -am “Initial Commit”

A commit has at least two parts: the file(s) to be included and a commit “message.”

The message is just a handy label (one or more tags, a description, or whatever) that we add to help us when searching through a long list of commits in the history.

Furthermore, if you want to see the entire history of your project, and locate a particular point to check out, simply issue the following command:

Command: git log

You may also read:

Related Posts

Active Connections Kali Linux Techhyme

How To Check Active Connections in Kali Linux

Kali Linux, known for its prowess in cybersecurity and ethical hacking, provides a powerful command-line tool called `netstat` for monitoring active network connections. This tool is indispensable…

Kali linux system information commands techhyme

Top 11 System Information Commands in Kali Linux

In the realm of ethical hacking and penetration testing, the post-exploitation phase is a critical juncture where an attacker seeks to establish and maintain control over a…

Linux System Key Components Techhyme

7 Major Key Components That Make Up A Linux System

Linux, an open-source operating system, has become one of the most widely used platforms due to its stability, security, and flexibility. It is comprised of various components…

File Finding Commands Linux Techhyme

Top 4 File Finding Commands in Linux

In the vast world of Linux, one of the most common tasks is finding files and directories scattered throughout the file system. Fortunately, Linux provides several powerful…

Informational Commands Linux Techhyme

Top 9 Essential Informational Commands in Linux

In the world of Linux, knowledge is power, and understanding the status of your system and its processes is crucial for efficient management and troubleshooting. Thankfully, Linux…

Linux File Tree Techhyme

Exploring the Linux File Tree: A Comprehensive Guide

In the world of operating systems, Linux stands out as a powerful and versatile option, favored by system administrators and users alike. One of the distinctive features…

Leave a Reply