From ec6001f34db89e6fa19538ddd3e3561e8f83fdb7 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Mon, 22 Apr 2024 16:26:05 -0500 Subject: [PATCH] Document where to put env definitions for non-Windows platforms --- .../About/about_Environment_Variables.md | 21 +++++++++++++------ .../About/about_Environment_Variables.md | 21 +++++++++++++------ .../About/about_Environment_Variables.md | 21 +++++++++++++------ .../About/about_Environment_Variables.md | 21 +++++++++++++------ 4 files changed, 60 insertions(+), 24 deletions(-) diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 0d60c80e3b88..fa4a685455ad 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -314,12 +314,21 @@ System Control Panel: ## Create persistent environment variables on non-Windows platforms Linux and macOS have configuration files and scripts that the operating system -uses to set environment variables before starting an application. For example -on Linux, you can add environment variables to the `/etc/environment` file or -create a script that sets environment variables and put it in the -`/etc/profile.d` folder. On macOS, you can add environment variables to the -`/etc/zshrc` file. For more information, see the documentation for your -operating system. +uses to set environment variables before starting an application. + +When running PowerShell as the default (login) shell, you can define +environment variables in the global initialization files supported by the +operating system. For example on Linux, you can add environment variables to +the `/etc/environment` file or create a script that sets environment variables +and put it in the `/etc/profile.d` folder. On macOS, you can add environment +variables to the `/etc/profile` file. + +When starting PowerShell from another shell, you can define environment +variables in the shell-specific initialization files used by non-login shells, +such as `~/.bashrc` for `bash` or `~/.zshrc` for `zsh`. + +For more information, see the documentation for your operating system and +default shell. ## PowerShell environment variables diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 9e494fa9db39..2b01469ba750 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -314,12 +314,21 @@ System Control Panel: ## Create persistent environment variables on non-Windows platforms Linux and macOS have configuration files and scripts that the operating system -uses to set environment variables before starting an application. For example -on Linux, you can add environment variables to the `/etc/environment` file or -create a script that sets environment variables and put it in the -`/etc/profile.d` folder. On macOS, you can add environment variables to the -`/etc/zshrc` file. For more information, see the documentation for your -operating system. +uses to set environment variables before starting an application. + +When running PowerShell as the default (login) shell, you can define +environment variables in the global initialization files supported by the +operating system. For example on Linux, you can add environment variables to +the `/etc/environment` file or create a script that sets environment variables +and put it in the `/etc/profile.d` folder. On macOS, you can add environment +variables to the `/etc/profile` file. + +When starting PowerShell from another shell, you can define environment +variables in the shell-specific initialization files used by non-login shells, +such as `~/.bashrc` for `bash` or `~/.zshrc` for `zsh`. + +For more information, see the documentation for your operating system and +default shell. ## PowerShell environment variables diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index fcb9b1b94a1c..5afd305110e2 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -314,12 +314,21 @@ System Control Panel: ## Create persistent environment variables on non-Windows platforms Linux and macOS have configuration files and scripts that the operating system -uses to set environment variables before starting an application. For example -on Linux, you can add environment variables to the `/etc/environment` file or -create a script that sets environment variables and put it in the -`/etc/profile.d` folder. On macOS, you can add environment variables to the -`/etc/zshrc` file. For more information, see the documentation for your -operating system. +uses to set environment variables before starting an application. + +When running PowerShell as the default (login) shell, you can define +environment variables in the global initialization files supported by the +operating system. For example on Linux, you can add environment variables to +the `/etc/environment` file or create a script that sets environment variables +and put it in the `/etc/profile.d` folder. On macOS, you can add environment +variables to the `/etc/profile` file. + +When starting PowerShell from another shell, you can define environment +variables in the shell-specific initialization files used by non-login shells, +such as `~/.bashrc` for `bash` or `~/.zshrc` for `zsh`. + +For more information, see the documentation for your operating system and +default shell. ## PowerShell environment variables diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 14d6b392c7e7..bcd9a92afa8a 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -314,12 +314,21 @@ System Control Panel: ## Create persistent environment variables on non-Windows platforms Linux and macOS have configuration files and scripts that the operating system -uses to set environment variables before starting an application. For example -on Linux, you can add environment variables to the `/etc/environment` file or -create a script that sets environment variables and put it in the -`/etc/profile.d` folder. On macOS, you can add environment variables to the -`/etc/zshrc` file. For more information, see the documentation for your -operating system. +uses to set environment variables before starting an application. + +When running PowerShell as the default (login) shell, you can define +environment variables in the global initialization files supported by the +operating system. For example on Linux, you can add environment variables to +the `/etc/environment` file or create a script that sets environment variables +and put it in the `/etc/profile.d` folder. On macOS, you can add environment +variables to the `/etc/profile` file. + +When starting PowerShell from another shell, you can define environment +variables in the shell-specific initialization files used by non-login shells, +such as `~/.bashrc` for `bash` or `~/.zshrc` for `zsh`. + +For more information, see the documentation for your operating system and +default shell. ## PowerShell environment variables