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
26 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 ...
30
votes
7answers
23k 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
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 ...
19
votes
7answers
10k 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 ...
41
votes
2answers
7k views

'less' command clearing screen upon exit - how to switch it off?

How to force the less program to not clear the screen upon exit? I'd like it to behave like git log command: it leaves the recently seen page on screen upon exiting it does not exit the less even ...
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 ...
80
votes
4answers
84k views

Change environment variables as standard user

When clicking on "Advanced system settings", I need to login as the administrator and hence only edit the administrators environment variables (in addition to the machine wide ones). How do I edit 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
19 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
23 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 ...
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 ...
1
vote
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
vote
2answers
974 views

ZSH: Where to place environment variable so that launched application can pick it up?

I need an environment variable KEY="value" made available to a GUI application before starting it. The launcher file (the one that places the icon on the desktop and sidebar in Ubuntu) has a value of ...
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 ...
67
votes
4answers
37k 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 ...
2
votes
1answer
4k 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
0answers
292 views

Problems installing postgresql-9.3.4-4-windows-64 on Windows 7

I am trying to install postgresql-9.3.4-4-windows-64 on Windows 7 x64 and keep getting this error message: Error. There has been an error. Unable to write inside TEMP environment variable ...
24
votes
6answers
14k views

Cannot resolve %windir% / Cannot modify %path% or %path% being reset on boot

See Updates 3 and 4 below for how the issue has evolved My computer (Windows 7 x64, Lenovo Thinkpad T530) is having an issue resolving %windir%. After boot-up, everything works fine. At some ...
10
votes
5answers
50k views

Different PATH environment variable for 32bit and 64bit Windows - is it possible?

Is it possible to have whole or part of PATH environment variable specific to the type of running process's image (32bit/64bit)? When I run some app from within 64bit cmd.exe I would like to have it ...
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 & ...
5
votes
3answers
6k 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 ...
65
votes
2answers
143k views

Setting and getting windows environment variables from the command prompt?

This is a very basic question, but I can't find an answer. I want to set an environment variable from the command prompt and then be able to access it globally (for instance, I should see it by going ...
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 ...
3
votes
3answers
572 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
11k 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
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
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 ...
5
votes
3answers
7k 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
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 ...
22
votes
14answers
39k 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
607 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
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: ...
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
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 ...
2
votes
2answers
429 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 ...
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 ...
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 ...
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, ...
0
votes
1answer
151 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
415 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
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 ...