How To Install Geth On A Linux Machine

Geth or Go Ethererum is an implementation of Ethererum protocol in the Go language. You can use Geth with a public or a private blockchain. In this post, we're going to learn the installation of Geth.
 
I'm using Ubuntu 16.04 LTS server OS in this installation.
 

Install the latest version on Ubuntu via PPAs 

  1. sudo add-apt-repository -y ppa:ethereum/Ethereum     
Install the stable version of go-ethereum,
  1. sudo apt-get update    
  2. sudo apt-get install Ethereum     

Install an older version of Geth

 
An older version of Geth can be installed using tar file, here I am using version 1.8.16. To download the required Geth file, we need to check the OS version using the following command.
  1. > dpkg --print-architecture   
  2. amd64    
Once you have your OS information, download (amd64 tar in our case) file from Geth website.
 
Upload downloaded tar file on a server and extract using the following command,
  1. sudo tar -xvf <filename>    
In our case,
  1. sudo tar -xvf  geth-linux-amd64-1.8.16-477eb093.tar.gz     
Step into extracted folder
  1. cd geth-linux-amd64-1.8.16-477eb093     
It should contain the geth file, make it executable with the below command. 
  1. sudo chmod +x geth     
Copy file to the user bin.
  1. sudo cp geth /usr/local/bin/    
Check the Geth version with the following command
  1. > geth version  
  2. Version: 1.8.16-stable     
Geth is now installed successfully on the system. In the next article, we will see how to run a private Ethereum blockchain on a Linux machine.