How to Install Git in Your Ubuntu Using Terminal?

by AlanJacob688 in Circuits > Linux

13 Views, 0 Favorites, 0 Comments

How to Install Git in Your Ubuntu Using Terminal?

Installing Git.png

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows.

Git and GitHub are not same thing or even the same company.

Updating Your Ubuntu

Screenshot (110).png
Screenshot (111).png
Screenshot (112).png
Screenshot (114).png
Screenshot (116).png
Screenshot (117).png
Screenshot (118).png

First, we have to update our operating system - Ubuntu.

  1. Right-Click and select Open Terminal Here.
  2. Type this code - "sudo apt update" and press Enter. You might get "Do you want to continue? [Y/n]" message, just enter Y and press Enter.
  3. Once the update is completed, type this code - "sudo apt upgrade" and press Enter. You might get "Do you want to continue? [Y/n]" message, just enter Y and press Enter.
  4. It might take more than 25 mins to complete the process.
  5. Once the process is completed, type this code - "clear" to clear the terminal.


Note:

  • sudo - is the command that we use whenever we need root privileges.
  • apt - is the command that we use whenever we need to install, remove or update a package.
  • update - fetches the latest list of packages that are available in the repositories.
  • upgrade - updates all the available packages to their latest versions.

Installing Git on Ubuntu

Screenshot (119).png
Screenshot (120).png
Screenshot (121).png
Screenshot (122).png
Screenshot (123).png

In this step, we will be installing the Git.

  1. Now type this code - "sudo add-apt-repository ppa:git-core/ppa" and press Enter.
  2. You will asked to either press Enter or Ctrl-c. Press Enter.
  3. Now clear the terminal using "clear" command.
  4. Type this code - "sudo apt install git" to install the Git application in your OS. You might get "Do you want to continue? [Y/n]" message, just enter Y and press Enter.

Note:

  • sudo - runs the following command as an administrator
  • add-apt-repository - adds the following repository to the list of places where the system looks for software.
  • ppa:git-core/ppa - is the name of the repository where git-core uploads the updates for their software.
  • install - install the following software to the system.

Verify Your Version

Screenshot (124).png

Lastly, check if the installed version is latest or not.