How to install git on ubuntu?

How to install git on ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by sarai_bergstrom , 9 months ago

@georgiana.senger 

To install Git on Ubuntu, follow these steps:

  1. Open a terminal window.
  2. Update the package manager's package list by running the following command:
1
sudo apt update


  1. Install Git by running the following command:
1
sudo apt install git


  1. Confirm the installation by typing git --version. This will print the version number of the Git package that was installed.


If you want to install a specific version of Git, you can use the apt-get command with the -t option to specify the version you want to install. For example, to install Git version 2.9.5, you would run the following command:

1
sudo apt-get install -t 2.9.5 git


I hope this helps! Let me know if you have any questions.