From f0fae04dfe54c561ade5f6d6eab1811d1d22dc73 Mon Sep 17 00:00:00 2001 From: lunadogbot Date: Wed, 13 May 2026 22:47:22 +0000 Subject: [PATCH 1/3] docs: document DENO_INSTALL env var on installation page Adds a "Customizing the install directory" sub-section to the installation page explaining how to override the install location used by the official shell and PowerShell install scripts via the `DENO_INSTALL` environment variable, with examples for macOS/Linux and Windows. Closes #3047 --- runtime/getting_started/installation.md | 32 ++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/runtime/getting_started/installation.md b/runtime/getting_started/installation.md index 4cc474fdb..f83bbc628 100644 --- a/runtime/getting_started/installation.md +++ b/runtime/getting_started/installation.md @@ -16,7 +16,11 @@ Linux, only x64 is supported. ## Download and install [deno_install](https://github.com/denoland/deno_install) provides convenience -scripts to download and install the binary. +scripts to download and install the binary. The shell and PowerShell install +scripts place the `deno` executable in `$HOME/.deno/bin` (or `$Home\.deno\bin` +on Windows) by default — see +[Customizing the install directory](#customizing-the-install-directory) below to +install Deno somewhere else. @@ -188,6 +192,32 @@ vfox use --global deno +### Customizing the install directory + +By default the shell and PowerShell install scripts install Deno to +`$HOME/.deno/bin`. Set the `DENO_INSTALL` environment variable before running +the script to install to a different location — the binary is then placed in +`$DENO_INSTALL/bin`. + +On macOS and Linux, set `DENO_INSTALL` when invoking the piped shell so the +installer (not just `curl`) sees the variable: + +```shell +curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/opt/deno sh +``` + +On Windows, set `$env:DENO_INSTALL` before running the PowerShell installer: + +```powershell +$env:DENO_INSTALL = "C:\deno" +irm https://deno.land/install.ps1 | iex +``` + +Remember to add the new `bin` directory to your `PATH` so the `deno` command is +available in your shell. See the +[`deno_install` README](https://github.com/denoland/deno_install) for the +canonical behavior and other supported options. + You can also build and install from source using [Cargo](https://crates.io/crates/deno): From ae86ad928e6035c1bd0bafb8c4c13df8839fc4ef Mon Sep 17 00:00:00 2001 From: lunadogbot Date: Wed, 13 May 2026 22:52:56 +0000 Subject: [PATCH 2/3] docs: bump last_modified to today MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses review feedback — this PR adds new content, so the frontmatter should reflect today's date. --- runtime/getting_started/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/getting_started/installation.md b/runtime/getting_started/installation.md index f83bbc628..2096caa09 100644 --- a/runtime/getting_started/installation.md +++ b/runtime/getting_started/installation.md @@ -1,5 +1,5 @@ --- -last_modified: 2026-03-05 +last_modified: 2026-05-13 title: Installation description: "A Guide to installing Deno on different operating systems. Includes instructions for Windows, macOS, and Linux using various package managers, manual installation methods, and Docker containers." oldUrl: From 809323337ae4dba5558618ec0898c8943154074c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 21 May 2026 12:07:05 +0200 Subject: [PATCH 3/3] docs: dedupe DENO_INSTALL guidance in troubleshooting The 'command not found' bullet now links to the new 'Customizing the install directory' section instead of restating it. --- runtime/getting_started/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/getting_started/installation.md b/runtime/getting_started/installation.md index 0be7f8933..298bbb6f6 100644 --- a/runtime/getting_started/installation.md +++ b/runtime/getting_started/installation.md @@ -256,9 +256,9 @@ your `PATH` yet. To fix this: - Confirm the install directory is on your `PATH`. The shell install script defaults to `~/.deno/bin` on macOS and Linux; for npm-based installs, run `npm config get prefix` to find the directory containing the global `bin`. -- If you customised the install location, the shell install script's install - root can be overridden with the `DENO_INSTALL` environment variable, in which - case the binary lives at `$DENO_INSTALL/bin/deno`. +- If you customised the install location, the binary lives at + `$DENO_INSTALL/bin/deno` — see + [Customizing the install directory](#customizing-the-install-directory). ## Updating