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

8
votes
4answers
9k views

Setting Linux environment variables

I am running Red Hat Linux Enterprise 5; I am always using the export command to set environment variables. Are there any other ways to set environment variables and what are the ...
2
votes
3answers
10k views

Editing the /etc/launchd.conf file in OS X

I am trying to run Android project using Maven in Mac 10.7.4, for that I need to set environment and path variables. This are the steps I need to follow to run android using Maven Maven 3.0.3+ ...
15
votes
2answers
19k views

How can I set user environmental variables (such as PATH) from a non-administrator account on Windows 7

How can I set user environmental variables (such as PATH) from a non-administrator account on Windows 7? On Windows XP I could go into the Advanced Settings in the System Control panel. However, on ...
9
votes
1answer
6k 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 ...
3
votes
3answers
5k 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 ...
6
votes
2answers
12k views

TEMP vs TMP in Environment Variables

Is it right to have these two environment variables TEMP and TMP? If I make changes to one should I make the same changes to the other? For example I was installing cygwin and the directions told me ...
5
votes
2answers
3k views

How can I update cygwin shell environment variables set in System Properties window

Suppose I go into the System Properties window and add an environment variable to the Path. If I have a terminal window open, it will be unaware of the change, so I close it and open another one. Is ...
4
votes
2answers
15k views

WINDIR environment variable resolves to %SystemRoot% and not C:\windows

Some time ago I manually changed the WINDIR environment variable to test something in a legacy program I was working with (should have done this on a VM rather than my desktop :/ but it's too late ...
1
vote
1answer
5k 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 ...
8
votes
1answer
2k views

Running shortcut from command prompt without the .lnk extension (Windows)

I have created a folder (d:\shortcuts), created shortcuts for most applications in this folder and appended the folder path to the Path environment variable. Now all my applications are available from ...
6
votes
6answers
8k views

Why does my LD_LIBRARY_PATH get unset launching terminal?

I have a shell script to set up some environment variables and launch whatever program I send in as an argument: export PATH=$HOME/local/bin:$PATH export ...
5
votes
2answers
3k views

Is it safe to store critical passwords in server environment variables?

I have a cluster of servers, each with configuration files that currently contain plain-text passwords for sensitive, mission-critical systems (message queues, data stores, and other services). Some ...
5
votes
2answers
8k views

LANG and LANGUAGE environment variable in Debian based systems

It seems both the LANG and LANGUAGE environment variable are used by some programs to determine their user interface language. What are the exact semantics of these variables and where can I read ...
3
votes
1answer
775 views

Powershell systemroot in $env:path different when AC elevated

I have a strange behavior with the environment variables at my Windows XP SP3. When I logon as Administrator, the %SystemRoot% strings in PATH are substituted to C:\WINDOWS, the value of the variable ...
3
votes
2answers
2k views

Transferring environment variable through SSH / quoting in bash/sh/csh/tcsh

I want to transfer an environment variable over SSH. The "correct" way is using SendEnv/~/.ssh/environment, but that requires the server to support AcceptEnv or PermitUserEnvironment, which it does ...
3
votes
1answer
1k views

~/.bashrc not sourced in a new lxterminal window

I added some lines to my ~/.bashrc like export JAVA_HOME=/opt/jdk1.6.0_22 I sourced it: $ source ~/.bashrc $ env | grep 'JAVA' JAVA_HOME=/opt/jdk1.6.0_22 Then I created a basic bash script under ...
2
votes
2answers
4k views

Spaces in Linux environmental variables?

Given directory: /media/foo/can haz/bar, I have tried editing bash.rc with: export Foo=/media/foo/can haz/bar export Foo=/media/foo/can\ haz/bar export Foo='/media/foo/can haz/bar' export ...
2
votes
2answers
178 views

Unable to get profile variable using ssh

Unable to retrieve the profile variable using ssh. server2 ==> user apptst ==> bash profile has $APPHOME variable. Was trying to retrieve the value from server1 using ssh but failed. Used options ...
1
vote
1answer
1k views

Setting user environment variables is very slow

I'm using the GitHub for Windows application. Lately I've noticed that starting a PowerShell console from within the GitHub application takes ages. After some digging I've found that the slow command ...
0
votes
1answer
1k views

Set enviroment variable setx

I am setting a environment variable with setx(win7) in a cmd , that I started from a batch file, if I close the shell an open a new from batch file again and use Set command to check it, I do not get ...
0
votes
2answers
11k views

How do I add an environment variable so I can run an EXE from any folder in the Windows command line?

I went to Environment Variables in the Advanced tab of System Properties and added a new System variable like this: name: msbuild35 value: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe but ...
7
votes
2answers
11k views

How do I append user-defined environment variables to the system variable PATH in Windows 7?

I have two user defined variables: ANT_HOME set to %USERPROFILE%\Developer\Tools\Apache\Apache Ant\apache-ant-1.8.2 JAVA_HOME set to C:\Program Files\Java\jdk1.6.0_23 And I want append ...
7
votes
3answers
7k views

Refresh environment variable

How can I refresh a Windows cmd shell after I modified my Environment variables? i.e. in bash I can just do "source ~/.bashrc"
4
votes
1answer
1k views

Prevent Windows System %PATH% from being prepended to user %PATH?

I know how to set system or user specific environment variables: Now, the problem is that the PATH variable is treated such that the value you enter for the user PATH will be automatically appended ...
4
votes
3answers
2k views

how to set path environment variable

I want to compile a code in software which is needed to call visual c++;My Os is windows cp professional; I've installed visual studio professional v10.but it still shows an error message indicating ...
3
votes
3answers
1k views

How can I determine whether a Windows XP cmd variable ends with a given string?

I want to check on whether the last character(s) of an environment variable are \ or .exe. How can I do this in Windows XP SP3?
3
votes
1answer
9k views

Windows Server 2008 R2 Environment Variables

How do you set environment variables on Windows Server 2008 R2, specifically the PATH variable? The Microsoft Help source provides advice that doesn't match the screens and options I see on my server. ...
3
votes
1answer
417 views

How to shorten the no of characters display for the current directory in the prompt

I am using bash, and in my .basrhrc: I have the following which defined how my prompt looks: PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\w\[\033[00m\]:\[\033[01;34m\]\!:\#\[\033[00m\]\$ ' ...
3
votes
1answer
1k views

Basic *nix Question (Mac OS X): Where is my path being set?

I have a path that starts like this PATH=/opt/subversion:/usr/bin:/bin:/usr/sbin:/sbin [etc] and this is wrong (at least opt/subversion needs to be opt/subversion/bin). Where is this being set? I ...
2
votes
1answer
59 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
2answers
226 views

Reclaim home directory

The home directory is where a user is supposed to keep their personal files, for example documents and music. On my computer this is C:\Users\Steven also known as the %USERPROFILE% variable. The ...
2
votes
2answers
3k views

Escaping %’s in file-/folder-names at the command-line

Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to ...
2
votes
2answers
566 views

Windows XP Environment Variables

I think my PATH in my environment variables is not working properly and would like to ask a few questions about environment variables in general. What is the difference between User variables and ...
1
vote
1answer
2k 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 ...
1
vote
1answer
760 views

Set environment Path Windows 7

Trying to add stuff to the system environment Path via batch, vbs or anything really. This used to work in a .bat, but has stopped: setx -m path "C:\addtopath;%PATH%" This used to work in VBS, ...
1
vote
3answers
12k 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
0answers
320 views

My path keeps getting truncated and I have to restart explorer.exe to fix it

I have a mysterious problem on my machine. Periodically I find that my path on Windows 7 machine gets set to ...
0
votes
1answer
29 views

Distinguishing and Executing `set` & `env`?

What is the difference between the set and env commands? When would/should one be used as opposed to the other? How are they generally invoked? (Typical use; case scenario).
0
votes
1answer
110 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 ...
0
votes
0answers
460 views

Recover environment variables windows 8 with out system restore?

I nuked my path variable on a Windows 8 machine accidentally. I then copied the 'basics' from another Windows 8 machine, set up systemroot, and all my user variables such as java_home, etc. This is ...
0
votes
1answer
2k views

How to set environment variables on Windows 8 [duplicate]

Can anyone tell me how to set environment variables for Windows 8? I can't figure out how. I've tried following instructions for Windows 7, but they don't apply to Windows 8.
0
votes
3answers
4k views

where.exe does not find OpenSSL libs when %ProgramFiles% variable is used in the PATH environment variable

I installed both 32bit and 64bit version of OpenSSL libs on Vista x64. The 32bit version was installed in c:\Program Files (x86)\OpenSSL and the 64bit version was installed in c:\Program ...