How To Install Git on Ubuntu 16.04 LTS
Git is one of the most popular tools used as a distributed version control system (VCS). Git is commonly used for source code management (SCM) and has become more used than old VCS systems like SVN. In this article, we'll show you how to install Git on your Ubuntu 16.04 cloud dedicated server.
Installing Git on Ubuntu 16.04 LTS
We have also created a convenient video tutorial that outlines how to install Git on a Ubuntu 16.04 Server.
Now, let's get started on that install...
Preflight Check
- You should be running a server with any VPS Ubuntu LTS release.
- You will need to log in to SSH via the root user.
First, as always, we should start out by running general OS and package updates. On Ubuntu we'll do this by running:apt-get update
After you have run the general updates on the server you can get started with installing Git.
- Install Git
apt-get install git-core
You may be asked to confirm the download and installation; simply enter y to confirm. It's that simple, Git should be installed and ready to use! - Confirm Git the installation
With the main installation done, first check to ensure the executable file is set up and accessible. The best way to do this is simply to run Git with the version command.git --version
git version 2.7.4
- Configure Git's settings (for the root user)
It’s a good idea to setup your user for git now, to prevent any commit errors later. We’ll setup the user testuser with the e-mail address testuser@example.com.git config --global user.name "testuser" git config --global user.email "testuser@example.com"
Verify Config Changes
Now, we will verify the configuration changes by viewing the .gitconfig file. You can do this a few ways, we'll show you both methods here.
- View the config file using cat with the following command:
cat ~/.gitconfig
- Or, you can also view the same details using the git config command:
git config --list
- View the config file using cat with the following command:
And that's it! You have now installed Git on your Ubuntu 16.04 LTS server and have it configured on your root user. You can get rolling with your code changes from here, or you can repeat Steps 3 and 4 for the other system user accounts.
When a standard Cloud VPS is not secure enough, our HIPAA compliant server hosting is a dream come true. Liquid Web’s server outmatches the competition on performance and support. Check out how our Dedicated Servers can skyrocket your site’s performance.
Related Articles:

About the Author: David Singer
I am a g33k, Linux blogger, developer, student, and former Tech Writer for Liquidweb.com. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
CentOS Linux 7 EOL — everything you need to know
Read ArticleHow to install Node.js on Linux (AlmaLinux)
Read ArticleUpgrading or installing PHP on Ubuntu — PHP 7.2 and Ubuntu 22.04
Read ArticleWhy is your IP blocked?
Read ArticleLiquid Web Terraform Provider Deploying WordPress
Read Article