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

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 ...
1
vote
2answers
7k views

I overwrote my environment variable PATH

I've accidentally overwritten the environment variable PATH in Windows 8 (64 bit). How can I reset it? I'm scared to shut down the PC before fixing this problem. Otherwise I might copy it from ...
5
votes
2answers
5k 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
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 ...
5
votes
6answers
7k 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 ...
4
votes
2answers
1k 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 ...
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
925 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
157 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
2answers
3k 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 ...
1
vote
1answer
802 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 ...
1
vote
1answer
4k 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 ...
7
votes
2answers
9k 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 ...
5
votes
3answers
6k 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
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
1answer
446 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
1answer
683 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 ...
3
votes
1answer
380 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\]\$ ' ...
2
votes
2answers
158 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
2k 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
528 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 ...
2
votes
3answers
869 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?
2
votes
1answer
7k 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. ...
2
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 ...
1
vote
1answer
566 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
0answers
273 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
0answers
379 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
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 ...
0
votes
3answers
3k 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 ...