The objective is to install and perform basic setup of Git on Ubuntu 20.04 LTS Focal Fossa Linux

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 20.04 LTS Focal Fossa Linux
Git on Ubuntu 20.04 LTS Focal Fossa Linux

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
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 20.04 step by step instructions


SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  1. First step is to open a terminal and install Git by using the below command:
    $ 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
    
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.