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
1answer
21 views

PowerShell environment

I am proficient in bash and having trouble understanding the environment in PowerShell. Is there any way equivalent to /usr/bin for adding executables to the environment? How is the environment ...
1
vote
1answer
17 views

XCOPY can't read /EXCLUDE file

I'm trying to write a build script batch file for an Unreal Tournament 2004 mod I want to publish the source code for. This script contains a call to XCOPY with the /EXCLUDE parameter as follows: ...
1
vote
1answer
17 views

Execute command to remote server via SSH after exporting variable

I have two machines, A and B. I need to execute a script which is located in B by SSHing there from A. In order for the script to run I also need to export a variable. If I just SSH and export the ...
0
votes
0answers
21 views

SETX not working when run as service

I have a service which invokes a batch file which runs a Powershell script which calls SETX to update an environment variable. The environment variable gets changed, but the change apparently isn't ...
0
votes
1answer
75 views

How to set environment variable in mac osx yosemite and use in PHP web application

I am creating PHP web application. I need to get environment variable in my web application. I am using Yosemite OSX. I have executed following command: launchctl setenv ENVIRONMENT development I ...
0
votes
1answer
18 views

Changing Linux desktop's environment variables without re-login

I'm setting a particular environment variable in my .bashrc, and, once I source it, it is available both in the shell itself and in gVim instances that I start from the shell. But, if I start a gVim ...
0
votes
1answer
16 views

How to safely set a user specific environment variable for non-interactive ssh connections?

I am setting up a unison based backup procedure. The client is a Windows Server and the server is OS X 10.10 server. I have a dedicated backup-user on the server that is allowed to connect through ...
0
votes
0answers
20 views

How to set environment variables in /etc/environment?

I'm using Debian Jessie. I want to set some environment variables that will persist across reboots and work in non-shell environments. I've set the following in /etc/environment: SECRET_KEY=xxx ...
0
votes
0answers
12 views

In which zsh configuration file should environment variables like PATH be set/exported

The answer to this question for bash in Environment variables in bash_profile or bashrc? is basically that it should be done in a file that is only executed for login shells so that overrides of ...
1
vote
3answers
526 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
55 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 ...
0
votes
1answer
40 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
2answers
28 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
18 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 ...
0
votes
2answers
43 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 ...
1
vote
1answer
37 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: ...
-1
votes
1answer
16 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
37 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 ...
1
vote
1answer
49 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 ...
3
votes
5answers
156 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
0answers
11 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 ...
0
votes
0answers
13 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
53 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
16 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
43 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 ...
0
votes
1answer
26 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, ...
2
votes
1answer
33 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 ...
2
votes
3answers
84 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 ...
2
votes
1answer
42 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
0answers
46 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 ...
0
votes
1answer
225 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 ...
0
votes
1answer
49 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 ...
0
votes
1answer
68 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 ...
0
votes
4answers
75 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
45 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 ...
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?
1
vote
1answer
44 views

In what order does GNU env print environment variables?

When invoked without arguments, the env and printenv commands from the GNU Coreutils print the value of every environment variable. What determines the order in which these variables are printed? ...
2
votes
3answers
79 views

Can I change my PATH dynamically based on my cwd?

I would like to change my $PATH environment variable dependent on my current working directory. Say I'm in /foo/bar/baz and I have the directories /foo/node_modules/.bin and ...
-1
votes
3answers
201 views

Commands not executed with %comspec% /k

I am trying to execute a .bat file with a set of commands which can be executed individually through the command line, but not all together through the script: %comspec% /k ""C:\Program ...
1
vote
2answers
408 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
1answer
69 views

Evaluate %PATH% as the system-scope environment variable exclusively

In Windows' command line, echo %PATH% appears to merge the system and the user variables PATH in such order before printing. That seems reasonable, but I would also like to be able to print only the ...
1
vote
2answers
61 views

Why does the set command display more environment variables than the environment variables gui?

When I run the set command in command prompt the first variable I see is But when I open my Environment Variables GUI I don't see ALLUSERSPROFILE Why is that? There are numerous other ...
5
votes
1answer
226 views

Powershell: A variable within a variable; Variableception

So the easiest way to explain my problem is for me to show you this simplified version of what I'm trying to do: PS C:\> $a = 'hello' PS C:\> $a hello PS C:\> $b = '$a world!' PS C:\> $b ...
0
votes
1answer
80 views

Setting Environment Variables on Mac OS X

I'm new to using Mac OS X. From my understanding, it uses Linux under the covers. I have a need to add an environment variable. Currently, whenever I start a terminal window, I've been executing ...
1
vote
1answer
109 views

MAC equivalent - user name & appdata

I have a couple of questions: On PC I can get the username from the environment variable USERNAME and on LINUX it is USER - what the MAC equivalent? The users local area on windows can be found via ...
1
vote
1answer
28 views

Should system path & user path match?

This morning I was trying to add python to my windows 7 PATH and used: setx PATH "%PATH%;C:\python34\" /M This seems to have changed my path but not in the manner I'd hoped! My user path now ...
1
vote
1answer
149 views

How to call environment variables in runas command for right click context menu

I am having trouble with using environmental variables with using runas when using the command in the registry for a right click context menu command. I have tried different methods of escaping the ...
1
vote
1answer
64 views

Windows 8 Can't find executable in path with “where” command

I added the following line in my System Variable Path "C:\Program Files (x86)\FontForgeBuilds\bin" I can then run fontforge: C:\Windows\system32>fontforge -v Copyright (c) 2000-2014 by George ...