Skip to main content

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).

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 ...
barlop's user avatar
  • 24.2k
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 ...
geodic's user avatar
  • 1
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 ...
Dan's user avatar
  • 263
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/...
Saurabh Singh's user avatar
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\...
watkipet's user avatar
  • 425
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 ...
Srik's user avatar
  • 11
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 ...
3Dot's user avatar
  • 1
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?
GeorgeIrwin's user avatar
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 ....
Mishovski's user avatar
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 ...
Sidney's user avatar
  • 1,307
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 ...
Fëanorson's user avatar
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' ...
Attribute's user avatar
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 ...
Noumeno's user avatar
  • 106
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 ...
Khalil Mebarkia's user avatar
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 ...
David Anderson's user avatar

15 30 50 per page
1
3 4
5
6 7
87