github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/intro/getting-started/install.html.markdown (about) 1 --- 2 layout: "intro" 3 page_title: "Installing Terraform" 4 sidebar_current: "gettingstarted-install" 5 description: |- 6 Terraform must first be installed on your machine. Terraform is distributed as a binary package for all supported platforms and architecture. This page will not cover how to compile Terraform from source. 7 --- 8 9 # Install Terraform 10 11 Terraform must first be installed on your machine. Terraform is distributed 12 as a [binary package](/downloads.html) for all supported platforms and 13 architecture. This page will not cover how to compile Terraform from 14 source. 15 16 ## Installing Terraform 17 18 To install Terraform, find the [appropriate package](/downloads.html) for 19 your system and download it. Terraform is packaged as a zip archive. 20 21 After downloading Terraform, unzip the package into a directory where 22 Terraform will be installed. The directory will contain a binary program `terraform`. The final 23 step is to make sure the directory you installed Terraform to is on the 24 PATH. See 25 [this page](https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux) 26 for instructions on setting the PATH on Linux and Mac. 27 [This page](https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows) 28 contains instructions for setting the PATH on Windows. 29 30 Example for Linux/Mac - Type the following into your terminal: 31 >`PATH=/usr/local/terraform/bin:/home/your-user-name:$PATH` 32 33 Example for Windows - Type the following into Powershell: 34 >`[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ({;C:\terraform},{C:\terraform})[$env:PATH[-1] -eq ';'], "User")` 35 36 37 ## Verifying the Installation 38 39 After installing Terraform, verify the installation worked by opening a new 40 terminal session and checking that `terraform` is available. By executing 41 `terraform` you should see help output similar to that below: 42 43 ``` 44 $ terraform 45 Usage: terraform [--version] [--help] <command> [args] 46 47 The available commands for execution are listed below. 48 The most common, useful commands are shown first, followed by 49 less common or more advanced commands. If you're just getting 50 started with Terraform, stick with the common commands. For the 51 other commands, please read the help and docs before usage. 52 53 Common commands: 54 apply Builds or changes infrastructure 55 console Interactive console for Terraform interpolations 56 destroy Destroy Terraform-managed infrastructure 57 fmt Rewrites config files to canonical format 58 force-unlock Manually unlock the terraform state 59 get Download and install modules for the configuration 60 graph Create a visual graph of Terraform resources 61 import Import existing infrastructure into Terraform 62 init Initialize a new or existing Terraform configuration 63 output Read an output from a state file 64 plan Generate and show an execution plan 65 push Upload this Terraform module to Atlas to run 66 refresh Update local state file against real resources 67 show Inspect Terraform state or plan 68 taint Manually mark a resource for recreation 69 untaint Manually unmark a resource as tainted 70 validate Validates the Terraform files 71 version Prints the Terraform version 72 73 All other commands: 74 debug Debug output management (experimental) 75 state Advanced state management 76 ``` 77 78 If you get an error that `terraform` could not be found, then your PATH 79 environment variable was not setup properly. Please go back and ensure 80 that your PATH variable contains the directory where Terraform was installed. 81 82 Otherwise, Terraform is installed and ready to go! Nice! 83 84 ## Next Step 85 86 Time to [build infrastructure](/intro/getting-started/build.html) 87 using a minimal Terraform configuration file. You will be able to 88 examine Terraform's execution plan before you deploy it to AWS.