Similar to Debian-based distros we need to navigate to the Git’s release page on Github and copy the tar.gz URL. ![]() Git version 2.36.1 CentOS / Fedora / RHEL Once it has been completed, now let’s check the git version: git -version output Now, lets compile and install Git (it will take a few minutes) make configure Once downloaded and extracted use the cd command to navigate to the directory you just downloaded and extracted git to, in our case is the /usr/src/git-2.36.1 directory but in your case it might be different: cd /usr/src/git-2.36.1/ ![]() Then, we are going to download the file with the wget command and extract the file with tar on the /usr/src directory: sudo wget -c -O - | sudo tar -xz -C /usr/src Then, navigate to the the Git’s release page on Github and copy the tar.gz file URL: Debian / Ubuntuįirst, lets update our packages and then install all the dependencies required: sudo apt-get update sudo apt install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev make gettext libz-dev libssl-dev libghc-zlib-dev Let’s say you are looking for a specific version of git to install on our system, or just simply the version of git our package manager apt or yum installed an old version.įor this we need to compile Git from the source to get the latest version or even the specific one we are after. Git version 2.35.1 Installing a Specific version of Git in Linux (from Source) Let’s check git’s version to verify it has been installed on our system: git -version Output ![]() You can install Git on systems running Fedora or RHEL/CentOS distributions using the yum package manager. Git version 2.34.1 CentOS / Fedora / RHEL Let’s check the current version of git to see if its installed on our system: git -version Output Then we can simply tell apt to install git sudo apt-get install git ![]() To install git in linux, in this case Debian or Ubuntu we can use the apt package manager to do so:įirst, lets update the repositories: sudo apt-get update Depending on your distribution you will have to use one package manager or another. The installation of Git in Linux very simple.
0 Comments
Leave a Reply. |