To install Terraform locally (assuming you're running WSL on a Windows computer), follow the steps below.
Run an update first.
sudo apt-get update
sudo apt-get upgrade
Navigate to the Terraform download page and scroll down to Binary download for Linux. Choose the version you need and click Download
In WSL, go to the directory where the zip file was downloaded. Unzip the file and move to /usr/local/bin. Remove the zip file afterwards.
sudo mv terraform /usr/local/bin;
rm terraform*.zip;
Verify installation.
$ terraform -version
Terraform v1.6.3
on linux_386