From the TF docs Install page. That covers multiple languages.

macOS

brew install terraform

Or

$ brew tap hashicorp/tap
$ brew install hashicorp/tap/terraform

Linux

Add the HashiCorp GPG key.

$ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
``

Add the official HashiCorp Linux repository.

```sh
$ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Update and install.

$ sudo apt-get update && sudo apt-get install terraform