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
48 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 ...
55
votes
1answer
44k 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
16 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
11 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
23 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
38 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
113 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
811 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 ...
9
votes
1answer
4k views

Why unload variables in Windows batch files

Is it considered necessary or good practice to unload variables used in Windows batch files? For example in the following code, is the set myFolder= at the end necessary? @echo off set ...
1
vote
1answer
3k views

Path variables from system restore point, Windows 7 64-bit

Reading the answer here I don't understand this 'little button' to right of open. Navigate to your C:\Windows\System32\config\RegBack, click the little button to the right of "Open" for "Show ...
99
votes
5answers
215k 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 ...
0
votes
2answers
369 views

IF statements in batch files

I am currently using Cruise Control to schedule 'builds' for various internal websites. I use batch files to kick off each of these 'builds' (build meaning a specific webhelp output). Let's say ...
-1
votes
1answer
39 views

I don't see 'path' under environment vaariables

I am trying to set path for Python but I have no 'path' under environment variables. Below is a link for the original issue as well a screen shot. How can I fix this?
0
votes
0answers
17 views

Batch conditions and variable

I have a question about variable and batch windows. The main goal is : I have files in directory (pattern 0? with ? a number between 0 and 9). First I create a %%nf.bat (filename of each files) ...
0
votes
1answer
19 views

Java runtime environment path issues

I've had a problem with my Java installations for quite some time and I've never had time to sit and try to fix this problem. So I went ahead and uninstalled all the various versions of Java I'd ...
1
vote
2answers
2k views

Strange Windows Errors

I run Windows 7 and I've been getting strange errors from different applications, for example attempting to uninstall VMware Workstation causes the following error: "Error in the lua script: [string ...
13
votes
13answers
41k views

Windows command-line: create a file with the current date in its name

I'm trying to create a zip file from a batch script. I need it to be named like archive_.zip Unfortunately, this doesn't work on systems with the date formatted like y/m/d because of the slashes: ...
2
votes
2answers
48 views

Store command output in variable

If I do z='ls' and then echo $z it will print the directory I listed, but without newlines or formatting. I assume lack of colored formatting is impossible to get around, but would it be possible to ...
0
votes
1answer
31 views

Where do the variables of a new BASH shell come from?

I am puzzled as about how environment variables work. From what I am aware, for a new process to have some environment variables, its parent must have issued export. But what about all the variables ...
1
vote
1answer
22 views

Are User-specific environment variables in Windows 7 stored locally or in the profile

I have some libraries like Qt and OpenCV which are installed locally on several machines. The environment variables such as QTDIR and QMAKESPEC are user environment variables. Will these be stored ...
3
votes
4answers
264 views

Why is it bad to add '.' to PATH?

I've read one explanation saying it can allow malicious executables that are in the cwd to run in place of similarly named built-ins and core utilities. For something to wreak true havoc, wouldn't ...
1
vote
0answers
39 views

Apache2 SetEnv For Multiple VirtualHosts

I am looking to use a single declaration of a SetEnv var in my apache2.conf file & have that variable used by all the virtualhosts I currently have virtualhost-specific vars set up, but would ...
0
votes
1answer
580 views

Environment Variable ORACLE_UNQNAME not defined

I'm trying to install Oracle 11gR2 Entreprise Edition but during database creation, I got this Error : Environment Variable ORACLE_UNQNAME not defined And when I tried to lunch 'emctl.bat' From ...
1
vote
1answer
26 views

Effect of Windows environment variables (especially OMP_NUM_THREADS)

Does setting OMP_NUM_THREADS=1 in the global environment variables (via Control Panel -> Sytem -> Environment variables) affect only programs run from the command prompt or all programs?
2
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 ...
3
votes
1answer
2k 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
5k 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 ...
3
votes
1answer
7k 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
votes
1answer
83 views

Limitation in number of entries in System variables Windows 7 64-bit

I've encountered that there might be a limit of how many entries you can have in System Variables in Environment Variables, can someone verify my suspicion? I'm not talking about how many characters ...
0
votes
1answer
378 views

Setting system wide environment variable in Ubuntu 8.04 Server

This is my /etc/environment: HELLO="hello" Now I check that the environment is being set when connecting via ssh: ssh foobar@my_host env And this is the output: SHELL=/bin/bash ...
6
votes
1answer
6k views

What is the purpose of the environment variable asl.log?

I run Windows 7. I notice that there's an environment variable called asl.log. What is this thing? Who puts it there? What's the purpose of it? I searched and found only references to MacOS and ...
0
votes
0answers
85 views

Access environment variable on both OSX and Win7

I'm fairly sure this is impossible because of syntax issues, but here goes anyway... I'm using dropbox to sync some files that I need to access in both windows and osx. In the program I need to ...
4
votes
1answer
649 views

sudo -E not passing all variables

Reading the man pages I expected sudo -E to pass all environment variables to the subshell, but I am not getting the expected results. As expected, awesome: $ export ...
2
votes
4answers
2k views

Where is the Official list of Windows Environment Variables?

I'm working on some .bat stuff created in a legacy application, which uses many environment variables. I need to know exactly what is every one of them (%windir%, %os%, etc.). So I need the official ...
1
vote
0answers
83 views

Windows: Monitor Access to Environment Variables?

Programs (on Windows) often expect certain environment variables to be set. However, the name of these environment variables is often not well documented. E.g.: Does Eclipse expect %MINGW_HOME% or ...
0
votes
1answer
268 views

Using SETX to configure a pc's LM_LICENSE_FILE environment variable

Various Windows applications such as Matlab, Altair, Nastran etc use license servers, which require a system environment variable - LM_LICENSE_FILE, to be updated which would take a value along the ...
2
votes
1answer
642 views

Linux change environmental variables without rebooting for all shells

I am using Fedora 14 and I changed my hostname in /etc/sysconfig/network and by using the hostname command. The shell prompts correctly display the new hostname. However the terminal titles still ...
4
votes
5answers
5k views

Spawn a new terminal window (Mac OS X)?

I am often working in a process in the Terminal and I've set some variables and used cd and so forth. Then I'd like to open another Terminal window from there. Is there any way to do this?
2
votes
4answers
40k views

Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name

I have a batch file which starts the Oracle Services net start OracleOraDb11g_home1TNSListener net start OracleServiceORCL call C:\app\Edifixio\product\11.2.0\dbhome_1\BIN\emctl.bat start dbconsole ...
1
vote
1answer
47 views

Dynamic variable substitution in PATH

I want to run different versions of Java on the same machine (Linux Mint 17) with default to Java 7. So I put this into /etc/environment: JAVA_HOME="/tools/java/java7" JAVA7_HOME="/tools/java/java7" ...
1
vote
5answers
5k views

How do I substitute environment variables when I ouput a file?

I'd like to somehow spit out a file (which has env variable references) and substitute the actual values. This is what I've tried, but as you can see it's not working. Any ideas? -bash-3.00$ cat ...
0
votes
0answers
30 views

Alternative ways of passing PS1 env variable into Ubuntu for SSH session

I know that there are twenty thousand answers, none of them worked as expected, I'm more surprised than you are, so please consider reading the story first. I'm trying to achieve what appears to be a ...
2
votes
2answers
3k 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
27 views

max length for PATH environment variable

Using Windows 7 x64 I've noticed that if you add too much stuff to your PATH environment variable it stops working. There appears to be a max length for the PATH environment variable and I'm curious ...
0
votes
1answer
133 views

How to set environment variables for a terminal application on OS X Yosemite?

I am trying to make ABD tool to work in my terminal and I found that the likely reason why I get the command not found warning is that I need to set the environment variable's path. I found that I ...
0
votes
0answers
7 views

VIDLE does not work path

I have Python 2.76 on Windows 7. Canopy, pyserial and now VIDLE I have 64 bit processor so I checked that I chose 32 bit for all the software as the Arduino tutorial I want to do suggested. VIDLE ...
0
votes
1answer
21 views

Difference between su and su -c (environment variables?) when running db2?

When I type this: su <user> -c "/home/<user>/sqllib/bin/db2 catalog tcpip node <dbName> remote <ip> server <port>" I get this error message: SQL10007N Message "-1390" ...
155
votes
7answers
175k 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
2answers
904 views

How do I set the TEMP environment variable for the “Network Service” user?

We have a system that uses Path.GetTempFile and Path.GetTempPath calls to work with temporary files fairly frequently. This system also runs as the "Network Service" user. We're finding that we're ...
14
votes
4answers
7k 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 ...