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).
Questions tagged [environment-variables]
1298 questions
46
votes
5 answers
How do I see a list of all currently defined environment variables in a Linux bash terminal?
In a Linux bash terminal, there are often many environment variables that have been set, like $PATH and $HOME.
Is it possible to see all of the environment variables that have been set? How?
Cory Klein
- 1,692
9
votes
1 answer
Is there an environment variable for C:\Users\%USERNAME%\AppData\Local\Temp in Windows 7?
Is there an environment variable that by default points to C:\Users\%USERNAME%\AppData\Temp in Windows 7?
Or maybe C:\Users\%USERNAME%\AppData\local\Temp for that matter?
Also what are these referred to as?
leeand00
- 22,418
7
votes
6 answers
Why can't you resize the Windows Environment Variable box?
Recently having to set my PATH environment variable installing the JDK, I found it quite annoying that the box where you set environment variables was not re-sizable, and had was generally quite horrible to edit.
Aside from MS just not making this…
Javed Ahamed
- 334
5
votes
0 answers
Is there a way to expand environment variables in *.ini files?
I have to work with an ini file, but I need a value set in the file to be based on an environment variable. For example,
...
[program] dir=%SystemDrive%\SomeFolder\
...
In this case, SystemDrive is an environment variable on the machine. The…
Jonathan DeCarlo
- 653
3
votes
1 answer
multiline environment variable in /etc/environment
Title says it all really. I'm trying to set an RSA private key in /etc/environment. Things I've tried include wrapping the variable in single and double quotes, add a backslash at the end of each line and adding '\n' at the end of each line.
Oli
- 131
- 1
- 3
2
votes
1 answer
Inno Setup ChangeEnvironment not working
I am using InnoSetup to create an installer but the Environment is not refreshed after the installation. The user has to restart the computer in order for the Environmental Variable to be refreshed.
This is my code any help will be appreciated.
…
user3812737
- 21
2
votes
2 answers
what is LC_TERMINAL_VERSION in my env?
when typing env in my terminal one of the results is LC_TERMINAL_VERSION.
I've been wondering what it is, or if there's a way to get documentation on the different env vars that exist in my terminal
David 天宇 Wong
- 181
1
vote
2 answers
Different Execution the TEMP Variable and TMP in run window
Why does the environment variable "TEMP" work without a percent Sign in Run window, but "TMP" variable doesn't work? I know the "TMP" Variable works with "%TMP%" in Run window.
This is my Environment variable window configuration:
according to…
Ayub
- 113
- 5
1
vote
0 answers
Environment variable with different value
I operate a windows system with several applications, that all need a special home variable.
But if I set this "home" variable, all applications use the same value. Is there a way to set this variable independent of application?
shylynx
- 123
- 1
- 1
- 8
1
vote
1 answer
Change $HOME for program generated files
I despise all junk that programs generate in my home directory; I'd like to see this stuff placed in $XDG_CONFIG_HOME and $XDG_CACHE_HOME.
However, there are too many programs to configure and most of them probably have path hardcoded to $HOME…
usr
- 825
1
vote
1 answer
How can I avoid having to reload my environment?
I'm not sure why, but I keep having to type 'source /etc/environment' in order for my path to be updated correctly. I don't want to type this inside of my bashrc, since I don't want it related to that. This is for a server, and I want to make sure…
Bijan
- 179
1
vote
0 answers
Applying SonarQube Source File Exclusions
Using SonarQube 9.6.0,
I have a file frontend/frontendUI/src/services/mock-data.ts that contains, as per its name, a lot of quick-and-dirty mock data, which does not really make any sense or confirms to particular styles.
I'd like to skip SonarQube…
Zsar
- 233
1
vote
0 answers
overcoming the WARNING: The length of the extracted value is truncated to 1024 characters
I have read this solution but they all fall into the case of the path which is not my case.
Overcoming the 1024 character limit with setx
Basically I created and want to use my environment variable, let's call it MY_VAR which will be quite a long…
Miguel Costa
- 111
- 3
1
vote
1 answer
Edit system variables using setx
I can't seem to find the right parameters of setx to modify an existing system environment variable. Basically, I have a variable that I want to append ".old" to.
Dumont
- 111
0
votes
1 answer
Windows 10 - I want to set environment variable for D drive
This is what I mean by "I set up the environment variable for d drive
I am using windows 10 and I have installed Kafka in D drive. So when I set up the environment variable for d drive it does not work. I want to know if is it even possible to set…
Nizar Kadri
- 121