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

learn more… | top users | synonyms

0
votes
0answers
38 views

When does %PATH% get expanded?

Ok so I'm pretty sure this question has been answered somewhere already, I'm just not able to find it within 30minutes. I have set some custom variables (system-wide) and added them to my system ...
0
votes
0answers
8 views

how to save URL passed variable for page reloads [duplicate]

i am developing a blog website first time, the problem is here: i am displaying a 150 characters of all post on single page, and when user clicks on a particular post of his interest that post gets ...
6
votes
3answers
9k views

How to update the PATH user environment variable from command-line

I have a system PATH variable with the system level config. I use the user PATH variable to complement the PATH with user-specific config. I would like to update the user PATH variable from ...
8
votes
5answers
11k views

Wrong java -version being reported

I am running Windows 7 Professional x64 and have the following Java versions installed: x64 C:\Program Files\Java jdk1.6.0_24 jdk1.7.0_04 jdk1.7.0_07 jre6 jre7 x86 C:\Program Files (x86)\Java ...
0
votes
0answers
12 views

How to set user environment HTTP_PROXY variable depending on network attached?

I spend about half my time behind a corporate firewall with a restrictive proxy, and the other half on open outbound connections. When I am on the corporate network and use CLI tools through cygwin ...
0
votes
0answers
41 views

CMD doesn't update environment variables

When I edit the system environment variable PATH (or any other, I imagine) through Control Panel\System and Security\System > Advanced system settings, it doesn't update in CMD, even after ...
0
votes
1answer
148 views

CUDA program ignores CUDA_VISIBLE_DEVICES variable?

I'm using CUDA 7.5 on a machine with Ubuntu Server 14.04 and 3 GPUs: 2x Tesla K20C and 1x GeForce GT 630. I've tried to set the CUDA_VISIBLE_DEVICES to the according IDs so that the code only runs on ...
3
votes
1answer
263 views

How do you set environment variables for a single command on Windows?

Is there a way to set environment variables for a single command on Windows like ENVVAR=abc command on Unix? Variables set by set command on Windows seem to remain for the following commands, but ...
1
vote
2answers
25 views

Display the environmental variables seen by desktop applications

How can I know what environmental variables will be set when a desktop application (not bash or other command line shells) launches? Is there a utility tool?
1
vote
1answer
26 views

pass du (disk usage) result to a numeric variable

In a shell script, I'm looking for a way to pass the du (disk usage) result to a numeric variable, so that I cantie the execution of a shell script to the size of a specific folder. I've tried ...
0
votes
0answers
12 views

Environment Variable VS Registry [duplicate]

I'm confused about the usage of Environment Variables vs Registry. Is there best pratices on what to store where? For exemple, why have a PATH variable if I can read it from the registry? Thanks
19
votes
7answers
12k views

Adding an .exe to default path without adding the directory

For example, I want to add notepad++ to my PATH, however the directory also contains uninstall.exe and several other files/executables and I don't want them to "pollute" my path. Can I just add the ...
1
vote
3answers
2k views

Why cmder does not import the user path variables?

The path variable in the cmder only contains those paths imported form the system path variable. While in normal command shell, the system path and user path will be concatenated. I've found in the ...
40
votes
9answers
33k views

Overcoming the 1024 character limit with setx

I am trying to set environment variables using the setx command, such as follows setx PATH "f:\common tools\git\bin;f:\common tools\python\app;f:\common tools\python\app\scripts;f:\common ...
1
vote
1answer
23 views

How do I monitor changes made to environment variables ?

I have an environment variable whose value didn't match the one set by /etc/environment, even after reboot. I eventually found the auto-executed .sh script changing it, but that incident got me ...
5
votes
2answers
9k views

LANG and LANGUAGE environment variable in Debian based systems

It seems both the LANG and LANGUAGE environment variable are used by some programs to determine their user interface language. What are the exact semantics of these variables and where can I read ...
4
votes
3answers
6k views

LANG=C is in a number of the /etc/init.d/* scripts. What does LANG=C do and why do you need to set LANG=C.

Its not clear what it does or what it contains. I tried greping the out put of set and env to see what C or LANG are set to in other places on the systems. Nothing was clear about how it is used or ...
0
votes
0answers
23 views

using conditionals in environment modules

I am on a CentOS 6.6 system and I am trying to create some environmental modules. I have a package, HTSeq-0.6.1 that uses python and I wanted to have a conditional that checks the current version of ...
0
votes
1answer
49 views

Certain Variables won't expand in Windows System Environment Variables PATH [duplicate]

For some reason there are certain Environment Variables that won't expand when used in the "PATH" variable in the System Variables. For example, %SystemRoot% works just fine while %WinDir% doesn't. ...
0
votes
0answers
52 views

Why are my TMUX session options (set-option blah) always being applied globally?

Terse How can I set a different status-bg color in two different TMUX sessions? Why are environment variables acting unexpectedly in .tmux.conf? Verbose Different colors for the status bar I have ...
2
votes
2answers
10k views

How can I set an environment variable permanently in CentOS?

I used a following commmand in SSH terminal on my server: export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib and it works fine: my program finds all libraries at this point (if I launch it from my ...
0
votes
1answer
97 views

Setting environment variables in cmd has no effect

I'm trying to set up paths to VS tools to run them in command line, as per https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx I run vcvarsall x64 from elevated command prompt and check the ...
17
votes
7answers
15k views

Why won't my Windows 8 Command line update its path

I needed to add a new entry to my PATH variable. This is a common activity for me in my job, but I've recently started using Windows 8. I assumed the process would be similar to Windows 7, Vista, ...
0
votes
0answers
24 views

Mailman 3 - editing the welcome.txt via the rest API

Thanks for reading my post. I will explain my situation and then at the bottom explain what my question is regarding my situation. There is a .txt file configured in mailman to send out to users as ...
1
vote
1answer
38 views

windows PATH variable ignore version number

Since forever I have hardcoded environment path variables on windows, or used some script to find a path to an executable with a regex. Is there a mechanism for adding a location to the PATH ...
0
votes
0answers
9 views

NPM Windows doesn't execute program under the User Variable path [duplicate]

So I have npm and installed gulp globally. gulp.cmd is available under %Appdata%/npm and it had added the NODE_PATH user variable. When I type in gulp in my command prompt, it returns 'gulp' is not ...
0
votes
2answers
331 views

What is the default value of the PATHEXT environment variable for Windows?

What is the default value for the PATHEXT environment variable for different versions of Windows? Or even better: How can you reliably determine the original default system value for PATHEXT on a ...
0
votes
1answer
31 views

Debugging env vars from ssh

I'm writing a script and an application for an embedded board with linux - no X, only console. The only way to reach the target is via ssh, I don't have a monitor connected. The script should export ...
11
votes
8answers
28k views

Setting or modifying a (system wide) environment variable in cmd.exe

I am looking for a convenient way to add and/or modify and/or delete an environment variable from the command line. Particularly, I find myself at times in situations when I have to add a few ...
0
votes
1answer
18 views

How to add a enviroment variable without GUI [duplicate]

Is there a way how I can add a new environment variable specifically PATH without going into control panel etc. Is there a file I can edit for this or a command line argument that can do the same ...
64
votes
3answers
85k views

Is there a list of Windows special directories/shortcuts (like %TEMP%)?

I'm looking for a reference list of shortcuts like %TEMP%. When I'm using Windows+R or Windows Explorer and type %temp%, the Windows Explorer takes me to the Temp directory. Are there more of these ...
2
votes
1answer
3k views

Access/modify the user Path variable, not system Path

I am trying to make an Inno-setup installer for a program and my workplace doesn't allow us "regular" users to modify the system environment. In an effort to get around the restrictions, I'm trying ...
1
vote
1answer
145 views

Starting a chroot and drop into nonprivileged user home

I need to (temporarily) jail a non-privileged user. I tried something like: sudo chroot --userspec=mcon:users /wherever/chroottarget /bin/bash -i This almost works, but it doesn't set env vars ...
7
votes
2answers
14k views

TEMP vs TMP in Environment Variables

Is it right to have these two environment variables TEMP and TMP? If I make changes to one should I make the same changes to the other? For example I was installing cygwin and the directions told me ...
0
votes
1answer
5k views

How can I move or force a program installation to another location, even when unsupported?

I have an SSD as my main Windows drive, with a 640GB 2.5" HDD, partitioned to store programs and user settings, and also to act as backup (it's the only thing I had lying around at the time of ...
0
votes
2answers
22 views

Using one prompt input for two different functions

I would like to make a time lapse movie in a specific range. The script is working until it makes the movie. Here the script: read -p "Von welchem Zeitraum soll der Zeitrafferfilm sein? ...
1
vote
1answer
674 views

Exporting bash functions through ssh

So I found a way to transfer environment variables through ssh without having to change neither server nor client: Transferring environment variable through SSH / quoting in bash/sh/csh/tcsh But I ...
0
votes
0answers
131 views

SETX command missing in Windows10

In my Windows10 laptop, I notice that setx command missing. Get error message "setx is not recognized as an internal or external command" Any solutions to this issue? There are scripts which ...
5
votes
3answers
138 views

Why some programs need a Path value, and some others don't in Windows?

Why When I install Composer on Windows 7/8/10, or some UNIX-suited programs like GNU Tar, I need to set their Path value, and if I don't, they won't be usable by other programs?
3
votes
3answers
21k views

How can I refresh my PATH variable from the registry, without a reboot, logoff, or restarting explorer?

I've made some changes to the %PATH% variable in the registry. Now, I'd like to see those changes applied without having to go so far as a logoff, reboot, or reload of Explorer. Is there a way this ...
2
votes
1answer
187 views

Export bash function over SSH

I would like to export a bash function over ssh to use it in GNU parallel. That question seems to be answered here Exporting bash functions through ssh but I don't seem to be able to get it to work. ...
3
votes
2answers
10k views

Setting environment variables in Linux for all processes

I am using Ubuntu 9.1 (Karmic Koala) on my server. A simple matter of setting environment variables so that they are globally available across all processes is driving me crazy and I'd appreciate ...
1
vote
1answer
59 views

Passing Env Variables to Batch File

I'm having difficulties passing a env var (declared in my .bash_profile) to a batch file script which executes a BTEQ operation (in Teradata). .bash_profile contains: export DBPASSWORD='password' ...
0
votes
2answers
50 views

Set environment variables (e.g., $PATH) at beginning of script — Not applying for all programs

I must be overlooking something, but I've tried several ways to get this to work. I'm working on a super computer without admin rights. I need to use a specific java version for a particular ...
0
votes
0answers
217 views

How to change the default user location in windows 7 [duplicate]

Possible Duplicate: Moving users folder on Windows Vista/Seven to another partition I have been looking around and I figured out how to change the default program files location to D:\ and ...
0
votes
1answer
34 views

Distinguishing and Executing `set` & `env`?

What is the difference between the set and env commands? When would/should one be used as opposed to the other? How are they generally invoked? (Typical use; case scenario).
0
votes
2answers
29 views

Testing for unset variables in a for loop

I've written a script which parses a file and sets variables according to a fixed width within the file. I then want to check each variable and, if it's a blank field, set to "0". A simple variation ...
9
votes
1answer
6k views

Why unload variables in Windows batch files

Is it considered necessary or good practice to unload variables used in Windows batch files? For example in the following code, is the set myFolder= at the end necessary? @echo off set ...
7
votes
7answers
55k views

Spaces and Parenthesis in windows PATH variable screws up batch files

So, my path variable (System->Adv Settings->Env Vars->System->PATH) is set to: C:\Python26\Lib\site-packages\PyQt4\bin; %SystemRoot%\system32; %SystemRoot%; %SystemRoot%\System32\Wbem; ...
-2
votes
1answer
57 views

What does asterisk “*” mean in a unix PATH environment variable?

Example: # echo $PATH /home/admin*:*/bin I assume it's a wildcard of some sort, but is it one level deep, or many? For example, will */bin match only items in usr/bin or will it also match deeper ...