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
1answer
59 views

How to redirect a custom environment variable to Window's %HOMEPATH%

On Linux, you can obtain the path of the home directoy via HOME, in Windows via HOMEPATH. I'd like to create a custom environment variable in Windows called HOME that "redirects" to HOMEPATH. The ...
0
votes
1answer
49 views

%PATH% in Explorer bar causes error

When I type "%PATH%" in the address bar of Explorer, I get the error "Windows can't find ...
0
votes
0answers
22 views

How can I set temporary environment for explorer (renewed) [duplicate]

On windows 8.1 command prompt (cmd.exe) I can change environment variables, i.e. path. When I then start an explorer instance, that instance takes the default (its parents?) environment, not the one ...
0
votes
2answers
459 views

Set environment variable containing at symbol

I would like to set an environment variable containing the URL of my proxy server with my credentials, as in this blog post. The problem I'm having is that my password contains an at symbol and I am ...
1
vote
4answers
97 views

Stacking Windows environment variables

Is it possible to "stack" Windows environment variables such as, "RUBY_PATH" = "C\ruby\bin" "PYTHON_PATH" = "C:\python332" "PROGRAMMING_PATH" = "%RUBY_PATH%;%PYTHON_PATH%" "Path" = ...
3
votes
1answer
149 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 ...
0
votes
1answer
157 views

Modify persistent variables on a remote server host using 'ssh' from client host

As the title says, I want to modify environment variables on a remote server using 'ssh'. My first attempt was: $ ssh mysvr -l sikaiwei "getId=$ORANGE; echo $ORANGE; ORANGE=$((ORANGE+1)); echo ...
1
vote
2answers
336 views

PowerShell: Env: Avoid truncation of environment variables

PowerShell displays environment variables, one line for each. If a variable has a long enough value, it is truncated, and appended an ellipsis: > gci env: Name Value ...
2
votes
1answer
404 views

Meaning of LC_IDENTIFICATION environment variable

Just out of curiosity, what is the meaning of LC_IDENTIFICATION? The reason I am asking is, that a fresh US-English installation of Linux Mint (I guess Ubuntu would be the same), located in ...
0
votes
1answer
64 views

Windows 8 Enterprise Fail to boot after environment variable setting

I have some problem with my PC after using windows 8 enterprise edition. I use my PC for web development work. So for using PHP framework i need to set the environment variables, in my case i set to ...
2
votes
1answer
81 views

Export bash function over SSH

I would like to export a bash function over ssh to use it in GNU parallel. That question seems to be answered here Exporting bash functions through ssh but I don't seem to be able to get it to work. ...
0
votes
0answers
80 views

Driving me crazy. SETX /?

Rosalee is no longer a user, but her name remains %everywhere% I am thinking export registry and find/replace all Rosalee's or trying to use setx, but I cannot figure out the syntax for setx. ...
15
votes
1answer
9k views

How can I set environment variables for GUI apps in OS X Mavericks?

I've been struggling to get an app to run in OS X Mavericks. I finally was able to get it to run by drilling into the .app bundle and running the shell script directly. It seems that JAVA_HOME needed ...
0
votes
1answer
263 views

How to generically refer to the AppData folder on the Windows command line?

The original User's Profile directory lives in a directory like C:\Users\username\AppData. How can I refer to the current user's profile directory when using the Windows command line? By searching I ...
1
vote
1answer
441 views

environment variable for hkey_users/software

Many of my software configurations are stored in theHKEY_USERS\S-1-5-21-2715202203-4090495733-1863141328-1000\Software reg-folder. For developing Portable apps, I want to know the environment variable ...
1
vote
2answers
709 views

how to access variables that are set in a different windows batch file?

i have a windows batch file - called fileA.bat, which contains a variable set in it. Sample code of fileA.bat: set fileA_username=michael now i have another batch file, called fileB.bat, which ...
1
vote
2answers
1k views

Apple Mavericks - why doesn't this one-line BASH script set my Python virtual environment like I expect?

I have the following Bash script: #!/bin/bash echo $MYPROJECT_HOME/bin/myproject_venv/bin/activate source $MYPROJECT_HOME/bin/myproject_venv/bin/activate echo ...
0
votes
1answer
86 views

how to reset the system after accidently deleting the environment variables

I have deleted the paths under the advance system settings>environment variables>system variables in windows vista and since then options like, advance system settings, device manager and many others ...
2
votes
2answers
538 views

Go-lang go tool works with Bash but not Fish

For those of you who have no idea what Fish is: http://fishshell.com/ Similarly, if you are not familiar with a Go coding environment and still wish to try and figure out this small puzzle, here is ...
1
vote
2answers
4k 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 ...
1
vote
2answers
132 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 ...
0
votes
1answer
187 views

Understanding the scope and lifetime of environment variables in shell scripting

I'm pulling my hair out trying to understand shell scripting and passing environment variables, and what not. I'm trying to execute a PHP script from TextWrangler, that in it's turn opens a new PHP ...
1
vote
1answer
2k views

how to properly set environment variables

I've recently started using Windows (having used Ubuntu up until now) and I find myself unable to properly set environment variables. Whenever I set them they don't seem to work. I've been going to ...
0
votes
1answer
134 views

Cygwin messes up Windows PATH

I installed Cygwin and uninstalled it after some time on a Windows 7 machine. But, the PATH variable directories naming is not correct now. Could some one tell me how do I correct this? Log below - ...
1
vote
4answers
166 views

Mac OS X keeps “old” environment variable around

So far I had /Applications/play-1.2.5/ added to my $PATH variable. Now I'm working with 2.2.1, which I installed in /Applications/play-2.2.1 and changed in ~/.bash_profile (which is getting sourced at ...
0
votes
2answers
293 views

Unable to get ls to recognise LS_OPTIONS or LS_COLORS?

Trying to get --color=auto as the default ls argument. $ ls --version ls (GNU coreutils) 8.21 … $ echo $LS_COLORS ...
0
votes
1answer
318 views

Why doesn't environment variable get updated in cmd without restart?

CMD commands: setx SOMEVARIABLE "newpath" /M setx SOMEVARIABLE "%SOMEVARIABLE%;newpath2" /M Expected output on ECHO %SOMEVARIABLE%: newpath;newpath2 Actual output: %SOMEVARIABLE% Actual value ...
0
votes
2answers
1k views

Command prompt cannot find PATH variable

Sometimes, my command prompt cannot find the PATH variable. I have this occasional problem at work where when I open command-prompt and run commands like ipconfig or subst, I get an error saying ...
0
votes
1answer
21 views

Get the user name or host name of a connecting ssh user

I would like to get the user name or host name of a connecting ssh user to exec some functions in the .bashrc. # pseudo code if (ssh && connecting_ssh_username == "foobar") { do something ...
0
votes
3answers
1k views

How to keep variable preserve while running script through ssh

I am trying to run while loop with read through ssh: #!/bin/bash ssh root@10.10.10.10 "cat /var/log/syncer/rm_filesystem.log | while read path; do stat -c \"%Y %n\" "$path" >> ...
2
votes
2answers
2k views

What is the difference betwen /etc/environment and /etc/profile?

I understand that the former is used prior to the latter, but what is the conceptual difference? Is there any good reasons I should set some variables in one and not in other? Except the fact that ...
1
vote
0answers
52 views

What''s the “earliest” place one can set an environment variable during Linux boot process?

I know I can set a variable in a shell startup file, but the thing is, I am trying to set up a POSIX-compatible environment, and a POSIX shell does not parse any startup files other than the one ...
0
votes
2answers
167 views

How put path changing .bat file inside %PATH%?

I have a problem described here (you can read it for better understanding). I need to write .bat file that change path. For example: While sending a command in cmd: cd ~ I want to go to %HOMEPATH%. ...
4
votes
1answer
67 views

When should you set PATH variables in “User variables” vs. “System variables”?

On a single-user system (Windows 7), does it matter whether you set PATH variables in User-variables or System-variables? Why choose one over the other?
1
vote
1answer
2k views

Why does subshell not inherit exported variable (PS1)?

I am using startx to start the graphical environment. I have a very simple .xinitrc which I will add things to as I set up the environment, but for now it is as follows: catwm & # Just a basic ...
0
votes
0answers
25 views

Has anyone gone through relocating the %ProgramFiles% directory, and can comment on the process / pro/con's?

There are many questions on this SE subsite that ask if it is possible/how. I have commented on some of them that suggest changing the HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir ...
1
vote
2answers
75 views

Win7 Path not being recongized

I have this path PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;c:\Program ...
3
votes
1answer
333 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 ...
0
votes
0answers
219 views

Using environment variables in windows registry

I have a game that normally saves everything to the same folder. I want to have a separate save folder for each windows 7 account. The game's save path is stored in the windows registry. It doesn't ...
0
votes
2answers
1k views

Using an environment variable set to a path value: the system cannot find the path specified for %OPENCV_DIR%

I'm trying to set an environment variable to point to the directory into which I have extracted the latest version of OpenCV, following the instructions in OpenCV's Installation in Windows tutorial. ...
0
votes
1answer
301 views

How can I run a command as a different user while Fedora boots up?

I have a server which runs Fedora 19. When the server boots up, I need to run bunch of commands. I do this in /etc/rc.d/rc.local file. This works well. Now I need to start my nodejs server from this ...
0
votes
1answer
170 views

Ubuntu — Application global environment variables

So I have an application I am deploying to an Ubuntu 12 server. My application has several "parts" to it: There's a web server, run as part of an upstart script There are cron jobs There are ...
0
votes
1answer
489 views

How to set path for MinTTY under windows/cygwin correctly?

I made windows shortcut with the following target: D:\APPS\cygwin64\bin\mintty.exe /bin/env PATH=/local/bin:/usr/local/bin:$PATH /bin/bash --login -i I was expecting it prepend path with my given ...
2
votes
1answer
3k views

How to change the location of APPDATA?

My C: is getting full regularly and now I don't have space. (It is less than 500Mb and system freezes or crashes often). I have already moved all user documents to other harddrive. I want to move ...
2
votes
3answers
72 views

How to get to Environment Variables from Run

I often need access to the Environment Variables on my Windows 7. What command do I need to type in the Run window to get to them? At the moment I do the following: Control Panel > System > Advanced ...
0
votes
1answer
1k views

Microsoft Word suddenly won't save files; “word could not create the work file - check the temp environment variable”

My brand-new install of Word 2007, which had been working just fine, suddenly refused to save any files. I'd hit Ctrl-S, and it wouldn't complain but it wasn't saving. Then upon exiting, Word would ...
12
votes
3answers
10k views

Switching between Java 7 and 8 in OS X

I have installed Java-8. Now I wanted to go back to Java-7 by default so I type in... /usr/libexec/java_home -v 1.7.0_40 --exec java -version /usr/libexec/java_home -v 1.7.0_40 --exec javac -version ...
0
votes
1answer
52 views

Configuring .profile for use across multiple servers

I have a home directory that is mounted to several CentOS servers simultaneously, part of an OpenGrid cluster. Most of these server nodes are configured identically, so my personal configurations in ...
1
vote
1answer
128 views

Deleting an Environment Variable from all users on Windows

I need to know if there is any way to delete all the instances of a given environment variable, this means from all users and from the system itself. The problem is about a software update. I need to ...
3
votes
2answers
71 views

Alert on Windows startup

I get a weird alert on windows startup and have no clue where it is from, but I have a feeling it has to do something with environment variables. I did some research, but couldn't find a thing. I am ...