DEV Community

Karin
Karin

Posted on

1

Step-by-Step Guide to installing Terraform on Windows on a subsystem Linux/Ubuntu server

Sometimes it's way easier to use Linux on a Windows OS. For those who love Ubuntu/Linux and want to work comfortably with Terraform, this post is for you!

One of the reasons I love working with Ubuntu/Linux is because installing software is far easier than on Windows. You only need one line command: sudo apt install, or sudo snap install...

No fuss, no hassle!

Another reason is that Ubuntu Linux is an open-source OS with plenty of capabilities to work with lots of tools, programming languages, etc.

1. Step 1: Head to the Terraform website

Visit Terraform's website and click on 'Download Terraform'.

Image description

Step 2: Go to the Linux Tab option

By default, we see Mac OS first on the left-hand side, so choose 'Linux' and copy the first command option with wget -O on your Ubuntu terminal. I assume you have previously installed Ubuntu with wsl --install.

If that does not work, then use: sudo snap install terraform

The reason for using snap is because if you use sudo apt, it will likely print an error such as:

This is because Terraform is available via the snap package manager.

Step 3: Check Terraform installation

Type in your Ubuntu terminal the command: terraform --version

If you successfully get a message with the version of Terraform, then we can be certain that Terraform has been installed.

Image description

Important to know: because we are installing Terraform on WSL (Windows Subsystem for Linux), it is not necessary to add its path to the environment system variables which makes sense because we are using wsl.

If you want to install it directly on Windows, then I advise you to use this article from another fellow dev creator: Step by Step guide to installing Terraform on windows

Happy Terraforming!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay