• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Git on Ubuntu 21.04

  • 00:27 lsb_release -a
  • 00:38 sudo -s
  • 00:50 cd /
  • 01:02 apt install git
  • 01:30 git --version
  • 01:45 git config --global user.name "linuxhelp"
  • 02:17 git config --global user.email "user@linuxhelp.org"
  • 03:09 vi ~/.gitconfig
  • 03:37 git config --list
{{postValue.id}}

How to Install Git on Ubuntu 21.04

Introduction:

Git is a software for tracking changes and can also be used to store content.It is a prominent version control system and it aids in handling numerous codes by maintaining a history. It is free and open-source software that also possesses a remote repository. Its main goal is to include speed and data integrity.

Installation Procedure

Checking OS version

linuxhelp@linuxhelp:~$ lsb_release -a
No LSB modules are available…
Distributor ID:	Ubuntu
Description:	Ubuntu 21.04
Release:	21.04
Codename:	hirsute

Swithc to root user

linuxhelp@linuxhelp:~$ sudo -s
[sudo] password for linuxhelp: 

Changing directory

root@linuxhelp:/home/linuxhelp# cd /

Installing Git

root@linuxhelp:/# apt install git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 257 not upgraded.
Need to get 4,415 kB of archives.
After this operation, 30.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu hirsute/main amd64 liberror-perl all 0.17029-1 [26.5 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu hirsute/main amd64 git-man all 1:2.30.2-1ubuntu1 [931 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu hirsute/main amd64 git amd64 1:2.30.2-1ubuntu1 [3,457 kB]

Checking the installed git version

root@linuxhelp:/# git --version
git version 2.30.2

Configure global user by using following command

root@linuxhelp:/# git config --global user.name "linuxhelp"

Configure global Mail by using following command

root@linuxhelp:/# git config --global user.email "user@linuxhelp.org"

Opening the git configuration file

root@linuxhelp:/# vi ~/.gitconfig

Snap 1

Listing the credentionals

root@linuxhelp:/# git config --list
user.name=linuxhelp
user.email=user@linuxhelp.org

By this the installation of Git on ubuntu 21.04 comes to end

Tags:
lincoln
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is GIT software?

A

It is an acronym for Global Information Tracker that is widely used in the version control system. It aids in tracking the prior changes that were made in files.

Q

What is the difference between Git and GitHub?

A

The Git is a version control system, whose main purpose is to maintain track of the source code history, whereas Github is a cloud-based hosting that aids in managing the Git repositories.

Q

What is the purpose of Git?

A

Git is a software that is widely used for coordinating work in order to develop source files that are usually done among programmers and it is mainly used to track changes in any set of files.

Q

What is a Git repository?

A

The main purpose of it is to track and save the changes that were made in history and all the actions performed by it is by using a version control system.

Q

What is git bash?

A

It is an application that is widely designed for Microsoft Windows that can also be used in Linux systems environments and is recognized for providing an emulation layer.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.