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?
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
First, we have to update our operating system - Ubuntu.
- Right-Click and select Open Terminal Here.
- 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.
- 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.
- It might take more than 25 mins to complete the process.
- 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
In this step, we will be installing the Git.
- Now type this code - "sudo add-apt-repository ppa:git-core/ppa" and press Enter.
- You will asked to either press Enter or Ctrl-c. Press Enter.
- Now clear the terminal using "clear" command.
- 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
Lastly, check if the installed version is latest or not.