Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Terraform Tutorials: Installation & Configurations

How to install terraform in windows?

Step – 1 – Download a Terraform from https://developer.hashicorp.com/terraform/downloads

Step – 2 – Extract it into C:\tools\hashicorp\terraform [ filename – terraform.exe ]

Step – 3 – ADD “C:\tools\hashicorp\terraform” into PATH.

Step – 4 – open a cmd and run

$ terraform

Step – 5 – open a cmd and run

$ terraform version


How to add “C:\tools\terraform” in environment variable of cmd and powershell using command


# CMD
$ set PATH "%PATH%;C:\tools\terraform";
$ setx PATH "%PATH%;C:\tools\terraform" /M

setx: Command to set environment variables.
PATH: The name of the environment variable you want to modify.
"%PATH%;C:\tools\terraform": Appends the specified directory to the existing PATH variable.
/M: Sets the variable at the system (machine) level.

# Powerpoint
$ [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\tools\terraform", [System.EnvironmentVariableTarget]::Machine)

This PowerShell command appends "C:\tools\terraform" to the existing PATH variable at the machine level.

How to install terraform in Ubuntu?


$ wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg

$ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list

$ sudo apt update && sudo apt install terraform

$ terraform
$ terraform version

How to install terraform in RHEL/Centos?


$ sudo yum install -y yum-utils
$ sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
$ sudo yum -y install terraform
$ terraform
$ terraform version

How to install terraform in Linux Manually


$ wget https://releases.hashicorp.com/terraform/1.4.4/terraform_1.4.4_linux_amd64.zip
$ unzip terraform_1.0.2_linux_amd64.zip
$ chmod 755 terraform
$ mv terraform /usr/local/bin
$ terraform
$ terraform version

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.