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

19
votes
7answers
11k 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
1k 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 ...
1
vote
2answers
3k views

Environment Variable ORACLE_UNQNAME not defined

I'm trying to install Oracle 11gR2 Entreprise Edition but during database creation, I got this Error : Environment Variable ORACLE_UNQNAME not defined And when I tried to lunch 'emctl.bat' From ...
4
votes
1answer
9k views

TEMP environment variable occasionally set incorrectly

Occasionally, I find my TEMP and TMP environment variables set to C:\Windows\TEMP. They should be set to %USERPROFILE%\AppData\Local\Temp, and are configured correctly in System Properties. This ...
37
votes
9answers
29k 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 ...
2
votes
2answers
7k views

Setting proxy via http_proxy on Mac

I am using an HTTP proxy on MacOS 10.7 (which works for Safari.app, when set in the system preferences). I'm now trying to set the proxy for command-line applications using the $http_proxy environment ...
1
vote
1answer
15 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
8k 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
5k 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
20 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
29 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
16 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 ...
0
votes
1answer
23 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 ...
2
votes
2answers
7k 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
19 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 ...
16
votes
7answers
14k 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
9 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
29 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
7 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
1answer
4k views

Git is in the PATH, but is not being recognized as a command

I've recently reinstalled Git, and I just can't get it to run off the native Windows command prompt anymore. I'm sure it is in Path environment variable, as you can see: C:\Users\Ult>where git ...
0
votes
2answers
40 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
28 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
27k 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
17 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 ...
58
votes
3answers
78k 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
2k 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
113 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 ...
6
votes
2answers
12k 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
4k 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
21 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
628 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
44 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
128 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
19k 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
167 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
27 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
36 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
29 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
25 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
51k 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
38 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 ...
10
votes
2answers
8k views

Suppressing the “Picked up _JAVA_OPTIONS” message

I'm using _JAVA_OPTIONS to set some defaults for Java on RHEL. It works fine but now every time I start java I get the following message Picked up _JAVA_OPTIONS: -foo -bar -baz is it possible to ...
0
votes
1answer
23 views

How to store an ssl key as a variable in a script for use with ncat?

I am trying to write a wrapper script to start an ncat listener. I don't want to have to output the certificate and key to a file, rather I'd like to store it as a variable within the script, and call ...
0
votes
1answer
143 views

Windows: Can't launch any program from command prompt

I need to have ability to start program by the file name on Windows 7 like firefox.exe. But nothing from this thread works. ie Notepad++ creates an entry in App Paths but still command prompt is ...
1
vote
0answers
38 views

Windows command prompt default directory randomly changing

What happens is when I'm on my windows and open a command prompt, I sometimes don't get the right default directory. Sometimes command prompt opens with "H:\", sometimes it's "c:\windows\System32" and ...
18
votes
3answers
24k views

Environment variables in bash_profile or bashrc?

I have found this question [blog]: Difference between .bashrc and .bash_profile very useful but after seeing the most voted answer (very good by the way) I have further questions. Towards the end of ...
0
votes
0answers
25 views

Can't create or see Windows 7 restore points anymore

Long story short, I was deleting some path variable in the Environment variable > system variable > path. I needed to clean up some path variables for my python. Have done something like this before, ...