![Learning DevOps](https://wfqqreader-1252317822.image.myqcloud.com/cover/384/36698384/b_36698384.jpg)
Installing Terraform by script on Windows
If we use Windows, we can use Chocolatey, which is a free public package manager, such as NuGet or npm, but dedicated to software; it is widely used for the automation of software on Windows servers or even local machines.
The Chocolatey official website is here: https://chocolatey.org/, and its installation documentation is at https://chocolatey.org/install.
Once Chocolatey is installed, we just need to run the following command in PowerShell or in the CMD tool:
choco install terraform -y
The following is a screenshot of the Terraform installation for Windows with Chocolatey:
![](https://epubservercos.yuewen.com/A085E6/19470376308796106/epubprivate/OEBPS/Images/7d61347f-f29d-478a-97c2-49417b461816.png?sign=1739281069-YbeYbcC4UzK2hM9Q3nUOMbDLM4cu5VI2-0-fa16297f207b9e440f8c21da832a0b3f)
Executing the choco install terraform command installs the latest version of Terraform from Chocolatey.
Once installed, we can check the Terraform version by running the following command:
terraform version
This command displays the installed Terraform version.
We can also check out the different commands that Terraform offers by running the following command:
terraform --help
The following screenshot lists the different commands and their functions:
Let's now look at the installation of Terraform on macOS.