Questions tagged [environment-variables]
Environment variables are system-wide variables which share the same value. These variables are often parsed by the shell when executing commands, and are expanded into their appropriate variable. For example, this allows users to move file locations without needing to update hard-coded paths in scripts (they just have to update the environment variable).
1,299
questions
2
votes
3
answers
951
views
Is there a way to set environment variables for explorer.exe that aren't there when windows is restarted?
Is there a way to set environment variables for explorer.exe that aren't there when windows is restarted?
I was looking at some of the comments View process environment variables in Windows and they ...
0
votes
0
answers
588
views
How do environment variables work for a login shell?
I am writing my own shell and I have a bit of confusion about environment variables. If you start any process logged into the user, it will have access to a few “standard environment variables” such ...
0
votes
0
answers
216
views
Extend system environment variables - Windows
In Windows 10, is it possible to combine/extend system environment variables with user environment variables? Similar to how path works?
I've seen this answer on another question, but it only ...
0
votes
1
answer
900
views
Securing username and password passed as Environment variable
Username and Password are passed as plain text as environment variable while running a bash script from a existing process. using following command.
sudo -u someuser USERNAME=abc PASSWORD=xyz /path/to/...
0
votes
0
answers
472
views
What determines whether or not the %HOME% environment variable is expanded?
I have two machines (both on an AD domain). On one Windows 10 PC, if I open a command prompt and echo the %HOME% environment variable, I get this result:
C:\Users\johndoh>echo %home%
C:\Users\...
1
vote
0
answers
465
views
Environment Variable not showing up
I am implementing public private key based authentication and I need to parameters the location where I store my keys. So that, programmatically my jobs can read it from this location and establish ...
0
votes
0
answers
42
views
What happened to this added directory in environment variables path?
Added the following directory to the path by using this method:
set path=%path%;D:\Programm\jflex-1.8.2\jflex-1.8.2\bin
set path=%path%;D:\Programm\jflex-1.8.2\jflex-1.8.2\bin\jflex
but, I can't find ...
3
votes
1
answer
3k
views
How to set a profile for Windows Terminal with user defined environemt variables
I would like to create a dedicated profile for Windows Terminal with the following:
Update the PATH variable.
Set some new environment variables.
How can I achieve that?
0
votes
2
answers
3k
views
Jenkins build not reading or recognizing all of the environment variables with a Jenkins build in macOS
I have an issue reading or recognizing all of the environment variables with a Jenkins build.
All of those necessary variables have been set via Terminal and are properly written in both .bashrc and ....
0
votes
1
answer
211
views
Why do environment variables only expand to a certain level of nesting?
I found some confusing behavior in working with environment variables. If I have two environment variables and one points to another, when I reference the pointer variable, it will be automatically ...
1
vote
1
answer
301
views
Best way to detect that a ZSH scope runs inside a VScode's Terminal?
When I run build commands in Visual Studio Code I want to invoke my whole custom shell that I also use for macOS, thus I invoke;
source ~/.zshrc && sync_all_shell_env
There is a small problem ...
0
votes
2
answers
4k
views
Setting environment variables in bash script doesn't work?
If I run this on the command line, it will make the commit be at the specified date:
THE_TIME='2022-01-01T22:50:12 -0700' GIT_AUTHOR_DATE=$THE_TIME GIT_COMMITTER_DATE=$THE_TIME git commit -am 'commit'
...
0
votes
3
answers
982
views
How to run apps from Windows' command line like in Linux
Context: I use Fedora GNU/Linux as my main OS, but sometimes I need to work within Windows.
Over the years, using Linux distros, I have become used to working mainly through the command line, calling ...
0
votes
0
answers
1k
views
How to copy file of env variable to another file
I am executing bash commands inside a yaml file. I have set an env variable SECRET which point to a yaml file in my home directory, and I want to copy the content of this yaml file to another file, as ...
0
votes
1
answer
695
views
How to expand a variable containing another variable in a Windows Command Prompt window?
I have a variable x with the value "%USERPROFILE%\Downloads". In other words, the command set x produces the output shown below.
x="%USERPROFILE%\Downloads"
I then entered the ...