How to install Terraform CLI on Ubuntu 20.04

Jun 25, 2021 · 1 min read · Post a comment
How to install Terraform CLI on Ubuntu 20.04

Terraform is an open-source tool, created by HashiCorp. It’s an Infrastructure as Code tool that enables developers and DevOps to use configuration language called HCL (HashiCorp Configuration Language). Terraform uses a simple syntax and you can provision infrastructure across all the cloud providers and on-premises data centers, which makes it one of the most popular infrastructure as code tools. If you need to deploy a hybrid cloud or multicloud environment, you should definitely want to get to know Terraform.

Install Terraform on Ubuntu 20.14

Step 1. Make sure that your system is up to date and you have installed the following packages

sudo apt-get update && sudo apt-get install gnupg software-properties-common curl

Step 2. Add the HashiCorp GPG key

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

Step 3. Add the HashiCorp Linux repository

sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Step 4. Now update the packages to add the repo and install terraform

sudo apt-get update && sudo apt-get install terraform

Step 5. Verify the installation

terraform --version


Terraform v1.0.1
on linux_amd64


This tutorial shows you how to install Terraform CLI on Ubuntu 20.04. For more info please visit the official documentation at terraform documentation .
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.