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

1
vote
3answers
442 views

What does hyphen mean in Windows batch file?

In particular, I have problems understanding the hyphens in the following lines, which are from wikibooks if not -%1-==-- echo Argument one provided if -%1-==-- echo Argument one not provided & ...
0
votes
0answers
25 views

how to set environment variables in VM Fusion Windows 7

I have installed windows 7 just fine via VM Fusion, but am having trouble setting environment variables, as i cannot edit files on the C: drive. A specific example is the trouble i'm having with R ...
3
votes
3answers
563 views

How to capture session name into tmux variable?

I want to execute an external command based on the value of my session name. I know that the :display-message '#S' will give me the session name, but I want to have that name automatically sent to my ...
2
votes
3answers
10k views

%USERPROFILE% variable not working

If I try to create files in the command prompt using the commands mkdir C:\Users\Tristan\AppData\Roaming\modinstaller\recovery mkdir C:\Users\Tristan\AppData\Roaming\modinstaller\mods my computer ...
0
votes
0answers
38 views

call environment path commands from powershell

I can call any executable included in the environmental variable path from a command prompt by simply calling its name. However when i try to do the same from Power-shell I get an exception the ...
2
votes
2answers
5k 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 ...
18
votes
6answers
9k 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 ...
0
votes
1answer
12 views

/usr/bin/env is pointing to wrong ruby version. “No such file or directory”

If I type "rake spec" I get. /usr/bin/env: ruby1.9.1: No such file or directory This problem started happening when I uninstalled ruby 1.9.1 and used rvm to install the latest ruby version but ...
0
votes
0answers
12 views

Node Webkit - Environment Variables [on hold]

I can't find any decent examples of Node Webkit being able to temporaringly set environment variables. I am currently working on making a portable framework to place some of my installed apps into, a ...
0
votes
2answers
23 views

Are these environment variables standard?… HTTP_PROXY, HTTPS_PROXY, AND NO_PROXY

It seems that a lot of programs are designed to read these environment variables to decide what proxy to go through in order to connect to a resource on the internet. Those programs may also have ...
0
votes
0answers
8 views

Environment variable for Visual Studio 2013 tools pointing to old Path after re-install

I'm attempting to change the tools environment Path for VS2013 after Uninstalling from my E: drive and installing to my C: drive. Attempted %VS120COMNTOOLS% environment change first answer here and ...
5
votes
3answers
6k views

Too many folders in the path variable

I've encountered a strange issue - I can't launch Visual Studio, nor run simple commands from command prompt, seemingly due to my PATH variable being too long. Now that I look at it, I see that many ...
0
votes
2answers
42 views

'sample.exe' not recognised as internal or external command, operable program or batch file

Under Environment Variables, I set the path to sample.exe. I appended the System variable PATH with, C:\Program Files(x86)\Sample The sample.exe is in the Sample folder. Still, I get the above ...
22
votes
14answers
37k views

Why can't Windows handle an environment variable in Path?

My colleague and I have identical Dell workstations with Windows XP Professional x64 edition installed. My Path environment variable starts with: %JAVA_HOME%\bin;... My colleague's Path variable ...
0
votes
3answers
603 views

Virtualenv for bash

I really like virtualenv when working with python code and am wondering if there existed some tool which could emulate some of it when working in bash. What I want is some cleanly reverseble way of ...
1
vote
1answer
30 views

How can I run correct version of compiler when using elevated command prompt

I have two versions of the Typescript compiler (tsc.exe) on my system (1.0 and 1.5) and I cannot remove the earlier one because it is installed with Visual Studio 2013. They are located at: ...
0
votes
2answers
1k views

Windows 8 'setx' is not recognized as an internal or external command

I'm trying to edit an environment variable, but i'm getting an error that 'setx' is not recognized as an internal or external command, operable program or batch file. I can use the set command, but ...
-1
votes
1answer
12 views

ENV Variable not working - Windows 8

Trying to add an environment variable called phantomjs to my PATH: ECHO %PATH%: ...;C:\foo\phantomjs.exe but when I run where phantomjs, I get INFO: Could not find files for the given ...
1
vote
1answer
19 views

Windows Batch. Append to PATH Environment Variable, when It Contains Spaces

I want to add some binaries to path for my console session and I'm doing it like so if not defined WIXTOOLKIT_IN_PATH ( set WIXTOOLKIT_IN_PATH=1 set MY_PATH=%~dp0..\tools\wix SET ...
2
votes
2answers
400 views

How to remove path from PATH variable in fish

I am using fish as my shell in Debian and recently (after some upgrade) whenever I try to use command completion I have: set: No such file or directory set: Could not add component ...
0
votes
3answers
10k views

Setting environment variables and appending to system-wide %PATH% with a Windows batch file

I'm trying to set three environment variables and append them to the machine path. Right now my code is like this: setx CATALINA_HOME "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7" /m ...
-1
votes
0answers
51 views

How to populate environment variables in Mac OS X for CLI _AND_ GUI applications

I mostly use Linux as my development box, but I also run a Mac OS X based setup, which I would like to behave mostly as my Linux one. The main problem I face is to sync my environment variables I ...
1
vote
1answer
33 views

How to change environment variable when the option is inactive

I'm trying to change the environment variable in windows 8, however the option to change is inactive. I tried to change the PATH using the command line, however the path never updated when I closed ...
2
votes
3answers
79 views

To whom do environment variables belong?

From several websites I read that getenv is a system call. However I cannot find any reference to sys_getenv. I am trying to understand what "environment variables" are, exactly. Are they part of ...
3
votes
5answers
147 views

bash keep variable reference in another variable

I have the following variables in my .bashrc: export UPRODUCT=productName export U=/path/to/products/$UPRODUCT So typing cd $U will take me to /path/to/products/productName. What I want to do is, ...
2
votes
1answer
3k views

CentOS. Set environment variable permanently

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
142 views

Set IIS to run with environment variable

I'm trying to run IIS with the COMPLUS_ZapDisable environment variable set to 1. Per this link (which shows how to do it for regular exes), I hope this will allow me to load non-optimized versions of ...
1
vote
1answer
411 views

Setting HOME variable in RHEL6 system wide

Where does the HOME variable get set in RHEL6 (SL6.1)? On one system all users get HOME set to /home/username/, i.e. with the trailing slash, which I don't want, so I need to remove it.
2
votes
0answers
10 views

Cant physically type in variable value text box when editing PATH environment variable

I am quite lost with this and hope someone faces similar problem and fixed it. But it's as simple as not being able to type in the provided text box for changing variables values in the PATH. I can ...
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 ...
0
votes
0answers
11 views

Control number of matlab threads from Linux environment variables

I am configuring Matlab for a multi user cluster and want the users to request a specific number of cores when they are launching Matlab. For example, without controlling this, performing an inverse ...
0
votes
1answer
43 views

delete items from path environment variable

I have a question regarding editing the path environment variable on my windows 7 Machine. I have been editing my path using SystemPropertiesAdvanced.exe's dialog window, but the changes i make are ...
0
votes
0answers
15 views

Bash filename tab completion when an environment variable is present

When I use tab completion on a normal path like this: vim /home/tester001/di<tab> it correctly expands to: vim /home/tester001/directory_1/ and I can continue like this: vim ...
1
vote
0answers
28 views

How to add Visual Studio code to path variable?

My path variable had corrupted which I have fixed now. But during the process, I lost some of the original entries in the path variable. I specifically want to add entries for visual studio code and ...
0
votes
1answer
30 views

Can I use shortcuts from a directory in PATH?

I'd like to have a directory, add it to my PATH, and put shortcuts to executables in it. I've done it in a Linux and it worked so wonderfully, but it doesn't seem to work on Windows -- it just can't ...
2
votes
1answer
28 views

Why does ZSH local variable assignment fail?

I was reading this question and answer: zsh - variable assignment isn't working. The post explains how to fix it, but not why. Why does the local variable assignment fail in that case ? There ...
0
votes
1answer
25 views

Installing extensions of a program that is installed twice

I have Python installed twice in my computer. The python.exe file is located once under C:\Python34 and again under C:\Anaconda3. The first was installed through the standard Python installation, ...
1
vote
1answer
25 views

Use an environment variable to point to an “Open With” program

I have Windows Vista, but I guess this pertains to other versions as well. I want to set a program to be used in the Open With context menu. Now I want that the path to the .exe contain an environment ...
8
votes
2answers
4k views

What is the difference betwen /etc/environment and /etc/profile?

I understand that the former is used prior to the latter, but what is the conceptual difference? Is there any good reasons I should set some variables in one and not in other? Except the fact that ...
16
votes
4answers
18k views

Switching between Java 7 and 8 in OS X

I have installed Java-8. Now I wanted to go back to Java-7 by default so I type in... /usr/libexec/java_home -v 1.7.0_40 --exec java -version /usr/libexec/java_home -v 1.7.0_40 --exec javac -version ...
0
votes
1answer
75 views

'git' is not recognized as an internal or external command, operable program or batch file

I'm reciveing this error when trying to install something which uses 'git' command. I've already installed git and put the directory into my environment variable - C:\Program Files (x86)\Git\cmd I've ...
3
votes
1answer
37 views

In bash, declare an alias that depends on current variable content

I would like to declare an alias (in my .bash_profile) that will use the content (value) of a variable when the alias is used, not when it is defined. E.g., alias goSomeWhere="cd $BASE/somewhere" ...
0
votes
1answer
38 views

How to handle Permission denied on source command?

I am trying to persist my java environment variables to the system and I'm having trouble with the following: :$> source java.sh -ksh: source: cannot create [Permission denied] What is the ...
15
votes
1answer
1k views

What is the difference between SETX and SET in environment variables in windows

What is the difference between SETX and SET? As per my understanding: Both are used to set environment variables SETX is for global variables. SET is for local variables. Is it correct?
0
votes
1answer
54 views

Start command inside xterm with login shell, over SSH?

I'm trying to use ssh to remotely start an xterm that runs a command inside a non-interactive login environment with a file that sets up the environment that is in a non-standard location. Anybody ...
1
vote
2answers
10k views

I overwrote my environment variable PATH

I've accidentally overwritten the environment variable PATH in Windows 8 (64 bit). How can I reset it? I'm scared to shut down the PC before fixing this problem. Otherwise I might copy it from ...
64
votes
4answers
35k views

Windows 7's PATH and environment variables are corrupted

I have no clue, but lately I've been having this problem. After running my workstation suddenly something destroys PATH and lots of stuff stops working. Initially, my path had MANY directories listed ...
0
votes
4answers
63 views

Pinging using a variable

I'm trying to create a batch file that will ping a variable that is determined by the users input e.g. "Enter PC Name:" pc name =123 Then it pings 123.domain.com @echo off set /p UserInputPath = ...
3
votes
2answers
40 views

Can I delete (apparently) redundant elements between my two Windows PATH variables?

For some reason--and I'm not sure if this is standard on Windows--I've got 2 PATH variables in my Windows System settings under Environment Variables. Can I delete from one of them anything that ...
0
votes
2answers
40 views

Is there an equivalent to source which allows me to have a batch script alter environment variables of the parent bash process?

My situation is this: I use python with conda on a windows machine, and work mostly in cygwin when on the command line. Now conda allows for different python environments, similar to virtualenv, but ...