diff --git a/website/docs/cli/install/apt.mdx b/website/docs/cli/install/apt.mdx index fff3cdf2f4..6cc79c73cf 100644 --- a/website/docs/cli/install/apt.mdx +++ b/website/docs/cli/install/apt.mdx @@ -32,14 +32,14 @@ so in most situations the first step would be to configure your system to trust that HashiCorp key for package authentication. For example: ```bash -curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - +wget -qO - terraform.gpg https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/terraform-archive-keyring.gpg ``` After registering the key, you can add the official HashiCorp repository to your system: ```bash -sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" +sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/terraform-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/terraform.list ``` The above command line uses the following sub-shell commands: