Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - how to verify if and where Git is installed on Ubuntu

Tags:

git

ubuntu

I am new to Ubuntu and Git. How I can verify that I have installed git on my machine? When I tried apt-get I got:

root@ubuntu:/home/nebojsa# apt-get install git Reading package lists... Done Building dependency tree        Reading state information... Done git is already the newest version. The following packages were automatically installed and are no longer required:   linux-headers-3.13.0-24 linux-headers-3.13.0-24-generic   linux-headers-3.13.0-39 linux-headers-3.13.0-39-generic   linux-headers-3.13.0-40 linux-headers-3.13.0-40-generic   linux-headers-3.13.0-43 linux-headers-3.13.0-43-generic   linux-image-3.13.0-24-generic linux-image-3.13.0-39-generic   linux-image-3.13.0-40-generic linux-image-3.13.0-43-generic   linux-image-extra-3.13.0-24-generic linux-image-extra-3.13.0-39-generic   linux-image-extra-3.13.0-40-generic linux-image-extra-3.13.0-43-generic Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 133 not upgraded. 

but I don't know where are the packages installed.

Thanks for your help!

like image 569
Nash Avatar asked Mar 02 '15 21:03

Nash


People also ask

How do I find my git path Ubuntu?

2 Answers. Git executable can be found by using running git --exec-path, which usually lives in the Git execution path. git --exec-path will give you the path.

How do I know where Git is installed Linux?

Git is by default installed under /usr/bin/git directory on recent Linux systems.

How do you check if the git is installed?

Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation). Type git version to verify Git was installed.

Where is my git installed path?

The default path on windows is C:\Program Files (x86)\Git .


2 Answers

Type which git. It should return the path to the executable

If you want to see more details: https://serverfault.com/questions/96964/list-of-files-installed-from-apt-package

like image 140
Kevin Seifert Avatar answered Sep 27 '22 20:09

Kevin Seifert


Just call the git --version. It should return something like this:

$ git --version git version 1.9.3 (Apple Git-50) 
like image 35
curlybracket Avatar answered Sep 27 '22 22:09

curlybracket