git command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
git: command not found
or when using sudo you get the following error message
sudo: git: command not found
Solutions to git: command not found
How To Fix git: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu git is provided by git package.
git is:
Git is popular version control system designed to handle very large projects with speed and efficiency; it is used for many high profile open source projects, most notably the Linux kernel.
Git falls in the category of distributed source code management tools. Every Git working directory is a full-fledged repository with full revision tracking capabilities, not dependent on network access or a central server.
This package provides the git main components with minimal dependencies. Additional functionality, e.g. a graphical user interface and revision tree visualizer, tools for interoperating with other VCS’s, or a web interface, is provided as separate git* packages.
To fix this problem, we can install more using the command below.
sudo apt-get -y install git
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install git.
sudo apt -y install git
Or if you have aptitude installed you can use the following command.
sudo aptitude install git
Summary
In this tutorial we learn how to fix git command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.