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

How to set truly global environment variable?

I am working on a Mac and I tried setting them in /etc/launchd.conf and tried running a Java program from shell and the same program from Eclipse. I get two different outputs for System.getenv() in ...
0
votes
1answer
24 views

Why is my IP address appearing in the email header even though I am using a proxy server?

When I visited a proxy-check site accessing through a proxy server, I found that my true IP didn’t appear. But in the header of the mail that I sent accessing through the same proxy server, there ...
1
vote
1answer
20 views

Is it possible to have the PATH environment variable update without logging off?

In Windows 8.1, if I change the Environment Variable for PATH under either System or User and open a command prompt and execute path, whatever I appended to PATH is not shown unless I sign out of my ...
167
votes
4answers
193k views

What are PATH and other environment variables, and how can I set or use them?

Questions about setting environment variables the PATH are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for ...
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 ...
1
vote
3answers
3k views

Using Environment variable in registry for command

I'm making a program which requires arguments from context menu (click a file and invoke my program with the file name as parameter). I'm trying to add a registry key to ...\shell\myThing\command. ...
1
vote
4answers
1k views

zsh: automatically set environment variables for a directory

Let's say I have a project in: ~/working_dir Whenever I run commands from this directory, I need to have certain environment variables set. So I can export them like so: export VAR=value ...
2
votes
0answers
17 views

What is the path environment variable? [duplicate]

I just started with using the (Windows) command line tool for working with npm. And I end up quite often on StackOverflow when I'm stuck with some error and the solution is often to add [something] to ...
0
votes
2answers
13k 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 ...
0
votes
2answers
20 views

How can I set up an environment variable to work with TCC?

I am trying to set up TCC on Windows 7, but I can't seem to make it work dynamically from cmd To be able to invoke the compiler from everywhere on your computer by just typing "tcc", please add the ...
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
1answer
7 views

Unable to open display to specific user in Red Hat 6.4

I am trying to install Oracle database 11g in my Red Hat 6.4 and the installer aborts with a warning followed by an error message: Warning ">>> Could not execute auto check for display ...
67
votes
4answers
74k views

Change environment variables as standard user (Windows 7)

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 ...
2
votes
1answer
76 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
1
vote
1answer
42 views

When running a program as a Windows 7 service, where does the HOMEPATH variable map to?

I have a program that's being run as a Windows 7 service. In the program, the HOMEPATH environment variable is being used to set the location of a file. Normally, when the program is simply ran at a ...
-1
votes
0answers
18 views

Lock one standard user with one desktop environment

I'm a Windows user who is trying to get over to the Ubuntu platform. Slowly I find answers to my question, but this time I couldn't find my question in here. I hope I can make my question clear enough ...
0
votes
1answer
26 views

Is it possible to substring an environment variable in a windows 7 shortcut? [duplicate]

If I have an environment variable in Windows such as %username% if there any way I can substring that? I'd like to substring it down to the first 8 characters.
0
votes
1answer
50 views

Why is the directory Windows/Temp used instead of the Local user Temp when using %TEMP%

After installing my system in a new season of work, you must create a mechanism to actualize the same. This mechanism of this command line: schtasks /CREATE /SC onstart /DELAY 0015: 00 /TN "AppName ...
17
votes
3answers
20k views

How to extract environment variables from system restore point, Windows 7 64-bit

Recently a (badly written) piece of software erased my PATH variable. I've been installing software for years and recovering every single entry would be cumbersome. An even more cumbersome solution ...
0
votes
1answer
729 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 ...
0
votes
2answers
42 views

Append to System PATH variable without including the User's PATH variable

Imagine the following environment variables: System PATH = C:\Windows Bob's User PATH = C:\Users\Bob In a command prompt the PATH command returns C:\Windows;C:\Users\Bob After running setx /m PATH ...
1
vote
2answers
49 views

How do you create system variables via batch file for Windows 7?

How can I create a batch file which creates a new system variable? (You know, in advanced system settings > environment variables > System Variables). I want to create a new variable named ...
1
vote
3answers
68 views

Cannot resolve %windir% on Win 7 64-bit

I'm having a problem with my laptop, it can't resolve the %windir% environment variable. I checked on the net and find that the PATH variable must be under 2024 characters length. Mine is 3145. ...
1
vote
1answer
47 views

Permanently remove an environment variable

While installing Android Studio, it installed Jayatana as a dependency. Now when I ran java, it showed me a message as: Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar I ...
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 ...
1
vote
1answer
58 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 ...
1
vote
1answer
34 views

Unknown path in my environment variables

I have a path in my Windows 8 Environment variables .bin;does this make any sense? Is it most likely a typo or typeover? I was having some issues with Chocolatey working in my Console2 and when I ...
3
votes
2answers
191 views

Is the Windows 8 path variable supposed to be this long?

I have Windows 8 and my Path variable seems like it's way longer than it's supposed to be (I'm just starting to figure environment variables and stuff out, and trying to change my Path so that I can ...
3
votes
3answers
2k views

Strange PATH issue in Windows 7 - goes null after being set

I have some sort of a problem with the PATH system variable. Since I use a lot of cmd apps and scripts I've added a lot to it. But the string's length is not the issue. I've worked around this ...
0
votes
0answers
17 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 ...
0
votes
0answers
28 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
98 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
15 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
33 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
51 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
37 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
11k 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
37 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
156 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, ...
4
votes
2answers
4k 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
348 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
38 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
129 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
44 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 ...
116
votes
5answers
258k 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
27 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
39 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
367 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 ...