Skip to main content
This guide shows how to install Terraform on a Windows machine. It covers the manual binary method and two package-manager approaches (WinGet and Chocolatey). Links and examples for other platforms (macOS/Homebrew and Debian/apt) are included for context but are not required on Windows. Why this matters: installing Terraform correctly ensures the terraform CLI is available from any command prompt or PowerShell session and lets you manage infrastructure with consistent tooling.

Other-platform examples (for context)

  • Homebrew (macOS) example:
  • Debian/Ubuntu (apt) example:

Manual Windows download and installation

  1. Visit the Terraform install page: https://developer.hashicorp.com/terraform/install and download the Windows AMD64 binary (terraform.exe).
  2. Move the downloaded terraform.exe to a permanent folder, for example C:\Terraform.
The image shows a download page for Terraform from HashiCorp, specifically highlighting binary download options for Windows and Linux operating systems. A user is selecting the AMD64 version for Windows.

Add the folder to the system PATH

Make the terraform.exe executable available from any shell by adding its folder to PATH:
  • Right-click Start → System → Advanced system settings → Environment Variables.
  • Under System variables, select Path → Edit → New and add C:\Terraform.
  • Click OK to close all dialogs.
When editing system environment variables, be careful not to modify or delete other existing Path entries. Incorrect changes can affect other programs.
The image shows a Windows environment variables window, listing different system paths, overlaid on a system properties panel.
If you keep several HashiCorp tools together, you might prefer a folder like C:\HashiCorp containing multiple executables (for example consul.exe, vault.exe, etc.). The key is that the folder containing terraform.exe is included in PATH.
The image shows a Windows File Explorer window open to a folder named "hashicorp" on the local disk (C:), containing several executable files with names like "consul.exe" and "vault.exe".
After adding the folder to PATH and reopening PowerShell, confirm the binary is in place (example view in File Explorer):
The image shows a Windows File Explorer window displaying the contents of a folder named "terraform" on the C: drive. It contains a single file named "terraform.exe" with details such as date modified, type, and size.

Verify the manual installation

Open a new PowerShell window and run:
If terraform.exe is removed from the folder on PATH, the terraform command will no longer be recognized. WinGet provides a simple one-line installation and straightforward uninstallation. Install Terraform:
After installation, you may need to close and reopen PowerShell to pick up PATH changes. Then verify:
Uninstall with WinGet:
After uninstalling, running terraform version will return an error like:

Chocolatey alternative

If you use Chocolatey, install Terraform with:
Omit --version to install the latest available package, or change it to pin a specific version.

Quick reference: installation methods

After changing the system PATH or installing via a package manager, restart any open PowerShell or command prompt windows so they pick up the updated PATH.

Summary

  • Manual method: download terraform.exe, put it in C:\Terraform, and add that folder to PATH.
  • Recommended: use winget install --id HashiCorp.Terraform for a one-line install and easier uninstallation.
  • Verify your install with terraform version.
  • Optionally use Chocolatey if it fits your workflow.

Watch Video