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
0answers
15 views

Reuse of environment variables in Path

Is it possible to reuse environment variables in the Path environment variable from PowerShell? There are some environment variables like %SystemRoot% defined and are used in Path variable ...
0
votes
0answers
13 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 ...
4
votes
1answer
8k 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 ...
2
votes
2answers
4k 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 ...
0
votes
0answers
21 views

Can the %PATH% be recovered without any Restore Points?

I just found out that my PATH system variable in Windows is nearly empty (it has only the path to the ExtFS tool - I installed that one recently , and I'm guessing it overwrote the Path instead of ...
1
vote
1answer
85 views

Are there rules to Windows 7 Environment variable names?

On my Windows 7 computer, I created some custom user environment variables (right-click computer > properties > "Advanced system settings" > "Environment Variables..." > "New..." for "User variables ...
0
votes
0answers
9 views

How do I set $LESS invocation options in a lesskey file?

I'm trying to use less's lesskey-file support, as described in the manpage: KEY BINDINGS You may define your own less commands by using the program lesskey (1) to create a lesskey file. This ...
0
votes
0answers
19 views

cwrsync on Windows 7 and setting PATH variable

The rsync command rsync.exe -av -riz -e "ssh -p 2222 -i d:/vagrants/rails-dev-box/.vagrant/machines/default/virtualbox/private_key" --delete --delete-excluded --exclude ".git" --exclude "cwrsync.*" ...
1
vote
1answer
27 views

User vs. System Environment Variables: Do System Variables Override User Variables?

I have elevated rights to my laptop but not admin rights. Admin rights are required to modify system environment variables. I expected that if I created a user environment variable with the same name ...
2
votes
1answer
26 views

How to start terminal in which bash is running with adjusted environment variables?

I'm using Xubuntu with XFCE. I would like to write a bash script which opens a new tab in the xfce4-terminal. In this tab, the bash should be running with an altered PATH environment variable. ...
1
vote
3answers
10k views

Why can't I use %USERPROFILE% in %PATH%?

On my Windows 7 machine, using the System Properties > Environment Variables tool, I try to add %USERPROFILE%\Bin to the system variable PATH. For some reason, that doesn't work, even though ...
1
vote
2answers
34 views

How to use environmental variable in explorer for quick folder access?

I am a user of Windows 8. I frequently create and save document files to a folder with long path. Therefore I tried to create a environment variable for that folder MyFolder, to get fast access. ...
0
votes
0answers
79 views

The Voodoo XP error you cant fix . RDP / MSTSC.exe - cannot find <LANG_NAME>\mstsc.exe.MUI

I keep getting the error cannot file C:\Windows\System32\<LANG_NAME>\mstsc.exe.MUI I do have this path C:\Windows\System32\US_en and this one too C:\Windows\System32\en and I made ...
12
votes
5answers
8k 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, ...
3
votes
2answers
3k 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 ...
4
votes
4answers
346 views

How to get an .exe file to execute no matter where the user types its name in command shell on windows 7?

I have Windows 7. I have a .exe file here: c:\tools\dailybackup.exe When I am in the CMD window, I want to be able to type "dailybackup" in any directory and have it execute. Do I still need to ...
2
votes
3answers
33 views

How to export an environment variable inside window manager?

I can export VAR="value" and use $VAR from within a terminal until I close it. Is there a way to get this behaviour, inside a window manager/graphical environment? exporting an environment ...
1
vote
1answer
107 views

php is not recognized as an internal or external command although it is available in commandline

this is somewhat of a tricky question when it comes to "where should I place it?", but I assume a general problem behind it, which is why I am putting it on superUser. I have a Doctrine script which ...
1
vote
1answer
37 views

$HOME is not defined for root user on Ubuntu 14.04

On a fresh Ubuntu 14.04 install, the bash environment for the root user does not have $HOME defined. I need to run some apps from a root shell, for example: gdb /usr/sbin/apache2 This is difficult ...
0
votes
2answers
7k 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 ...
109
votes
6answers
244k views

How can I display the contents of an environment variable from the command prompt in Windows 7?

In Windows 7, when I start the Command prompt, is there any command to display the contents of an environment variable (such as the JAVA_HOME or PATH variables)? I have tried with echo $PATH, echo ...
1
vote
2answers
18 views

why 'export $Path=$Path:dir' won't work?

I am just wondering why do we need to use this command export Path=$Path:dir why does the command not look like export $Path=$Path:dir/dir'
0
votes
1answer
1k views

Forcing programs to be installed to another drive

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 ...
1
vote
1answer
35 views

Environment variables on Linux-like systems

How to set environment variables for a user in most generic way that is independent of shell environment variables (like profile for Bourne-like shells, bahsrc, zshrc, zshenv, ..)? The idea is to set ...
0
votes
1answer
150 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
0answers
34 views

Is there a window manager that allows you to set environment variables

My problem here is that I often stays logged in for a considerable amount of time and the usual methods of setting environment variables doesn't work in a satisfactory way: If I set environment ...
1
vote
1answer
54 views

Windows 7 CLI not recognizing commands without specifying extension

I've apparently gone and mucked up my system in a strange way. Windows 7's cmd prompt is no longer recognizing any executable or batch files unless I explicitly type their extension. ...
1
vote
0answers
99 views

user path not merged with system path

On my Windows 7 machine, for some reason the user path is not merged with the system path variable when I start a new command prompt. I have seen other related questions answered by a reference to a ...
0
votes
1answer
61 views

cmd error “The system cannot find the path specified.”

I am getting this error when I am doing a cd into a directory I stored in environment variables. But the thing is, when I cd into the same directory using the same ev using vim, I can successfully cd ...
0
votes
0answers
32 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 ...
0
votes
0answers
19 views

OSX seems to be ignoring any DYLD_* environment variables

I'm attempting to use a 3rd party SDK which is primarily written in C++. Their recommended approach for running the compiled output (an ODBC driver) on OSX includes setting an environment variable ...
0
votes
1answer
48 views

How to append to the user %PATH% from command line

I found plenty of questions like this one on StackExchange but no one work in my specific case. I would like to easily add literally %FOO% to the user environment variable PATH. I found the ...
0
votes
1answer
30 views

Is there any way to have Cygwin tools in PATH without them replacing Windows commands?

I would like to be able to use GDB, GCC and such straight out of a windows command prompt, so I put my Cygwin bin directory in my Windows path. Problem is that Cygwin programs now take priority over ...
4
votes
4answers
4k views

Missing environment variables in Windows 7

When I fresh boot my computer everything is dandy. Then after a few hours applications like Visual Studio, Notepad++, Games, iTunes, Windows components (Cmd prompt, Explorer, etc.), etc. stop working ...
0
votes
0answers
20 views

How to acchieve what http_proxy environment variable does for all traffic leaving the system?

I set up a trafficserver (5.1.2) instance as HTTP cache on a machine in my local network and now I'm looking for a way to enforce the usage of the proxy for HTTP requests to the outside world on port ...
2
votes
3answers
828 views

How to evaluate environment remote variables in SCP?

Is there a way to have environment variables on a remote host evaluated when using SCP? For instance, let's say I have $FOO= /mydir on host A; how would I do something like: scp ...
1
vote
1answer
58 views

I changed my system path in system variables, how can I bring it back to what it was?

I've been trying to unlock my htc device's bootloader and I couldn't get a fastboot command from the cmd to work. I had tried everything and eventually I found this site which said that I just have to ...
0
votes
0answers
29 views

Centos server change environment PWD

I've a Centos Linux 6.5 server. If in the root (/home/wwwuser/) of this server I execute phpinfo.php, I notice that under "environment" PWD is set to /home/wwwuser/test/. I tried to rename that folder ...
0
votes
1answer
62 views

Windows open command window here doesn't load env. variables

In windows if I right click and select "Open command window here" in a particular folder it works exactly the same way as "Open terminal here" works in Linux. It was working find until I installed a ...
4
votes
4answers
3k views

Add a directory and all subdirectories to the PATH variable with a single entry

I've got a directory in my home folder in which I place command-line software (CMD_Software). I put each piece of software in its own directory within CMD_Software in order to avoid clutter. I would ...
1
vote
4answers
2k views

Win7: messed up system - set too long path variable

I just messed up my Windows 7 Enterprise 64-bit. I tried to install CMake - and during installation i got an error saying something like it can't set the path variable, because it is too long (I ...
0
votes
0answers
26 views

Server 2012 R2 Folder Redirection via Enviroment Variable

Is it possible to redirect documents using enviroment variables in server 2012 r2? For example, I have an application that is writing files to ...
0
votes
1answer
59 views

How to create a shortcut in the launcher with specific enironment variable?

I want to start emacs with LANG environment variable set to en_US.UTF-8, and I don't want to affect other programs. In terminal, it could be realized using LANG=en_US.UTF-8 emacs. Then I created a ...
61
votes
1answer
48k views

How to reload /etc/environment without rebooting?

/etc/environment is officially the correct place for system wide environment variables. But how can I reload the assignments in this file without rebooting or relogging? Interestingly enough google ...
0
votes
0answers
32 views

environment variable in registry on windows 7 x64

Im playing around with this guide for creating a default profile on Win7 and can't seem to get it working correcting: ...
0
votes
0answers
15 views

Enviroment modules for Windows?

I am starting to learn how to use modules (http://modules.sourceforge.net/) on a hpc server and I like this very clean solution. Is there any tool like modules for windows? I am just interested of ...
1
vote
1answer
28 views

Grep fails to find sequence after assign to variable

I run: awk -F ',' '{print $2}' data.dat | sort | uniq | tr '\n' ',' | grep "*)>nS4XkrlH @XUL" and the sequence is located in results. Then I run b=`awk -F ',' '{print $2}' data.dat | sort | ...
-1
votes
1answer
44 views

Wrong environment Settings invoked in Commands

Getting wrong and extra pathnames in error messages using "For /D", "dir" and "if exist" commands when running the non-Powershell batch code to elevate UAC privileges code here. This has been noted at ...
4
votes
1answer
114 views

Using a system variable with spaces without truncating prematurely

I need to do something similar to this: dir > %USERNAME%.txt But what I get is that if the filename has a SPACE(" ") in it, then the name is cut there. I know that if I do this: set ...
1
vote
3answers
909 views

How to set the arithmetic precision in “set” batch files variables?

How do I set a precision to the SET arithmetic operation on divisions? eg. SET /A t=3/4 But that gives result as '0' and not '0.75' ( I want at least 2 decimal places ) Or is there any other ...