Terraform is a well-known Infrastructure as a Code (IaaC) platform. Terraform makes it easy to create and provision full-fledged data center infrastructures by using the HashiCorp Configuration Language (HCL). This article shows you how to install Terraform on Ubuntu 20.04.
For installing Terraform on Ubuntu 20.04, you need to perform all the steps described below:
First, you have to update your system’s cache with the following command so that there are no more broken links or dependencies:
sudo apt update
Now, you need to install two utilities on your Ubuntu 20.04 system that you are going to use later on. These two utilities are “wget” and “unzip” respectively and they can easily be installed with the following command:
sudo apt-get install wget unzip -y
In our case, since both of these utilities were already installed on our Ubuntu 20.04 system, that is why we received the messages shown in the image below:
After the successful installation of the “wget” and “unzip” utilities, we can now install Terraform on Ubuntu 20.04 system with the following command:
sudo wget https://releases.hashicorp.com/terraform/0.14.3/terraform_0.14.3_linux_amd64.zip
After a few seconds, the execution of this command will finish hence displaying the messages shown in the image below on your screen:
Since we have installed the zip file of Terraform, therefore, we need to unzip it with the following command:
sudo unzip terraform_0.14.3_linux_amd64.zip
Running this command will create an unzipped file named “terraform” as shown in the image below:
Now, we need to move this unzipped Terraform file to our /usr/local/bin directory for this tool to work properly. This can be done by executing the following command in your Ubuntu 20.04 terminal:
sudo mv terraform /usr/local/bin
If this movement takes place successfully, then no messages will be produced on the terminal as shown in the image below:
Up till now, Terraform will be successfully installed on your Ubuntu 20.04 system. You can check it out if it is so or not by using the “whereis” command. This command is used to find the path of the source code, binary, and man pages of any particular tool or package. You can use it in the following manner:
whereis terraform
Here is the output:
If you want to remove Terraform from your Ubuntu 20.04 system, then you will have to run the commands shown below successively:
sudo apt-get purge terraform
sudo apt-get autoremove
Installing Terraform on Ubuntu 20.04 will no longer be a hassle for you after going through this article. However, whenever you feel like you do not want this platform any longer, then you can simply uninstall it from your Ubuntu 20.04 system without thinking about anything else.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…