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

2
votes
2answers
645 views

Is it safe to change %TEMP% and %TMP% to a custom location?

I have an SSD drive that is nearly full and I'm looking for options to free up space. I noticed C:\Users\myusername\AppData\Local\Temp has several gigs of data. Is it safe to change the User ...
1
vote
0answers
172 views

Is there a way to expand environment variables in *.ini files?

I have to work with an ini file, but I need a value set in the file to be based on an environment variable. For example, ... [program] dir=%SystemDrive%\SomeFolder\ ... In this case, ...
5
votes
3answers
167 views

What is the simplest scriptable way to check whether a shell variable is exported?

For some shell sessions I want to be able to print a warning flag if a shell variable is not set and exported. It is fairly simple to do something like this to print "Error" in the prompt if SET_ME ...
2
votes
1answer
146 views

Is it valid for %Comspec% to have multiple entries?

I'm working through troubleshooting a problem on my laptop, and I've noticed something odd - my COMSPEC environment variable has two values. Output from typing SET at a command prompt: ...
0
votes
3answers
553 views

PS1 value not changing

I've logged in as the root of a machine. I changed the value of PS1 as: PS1="$PWD> ". I want it to reflect the change in directory. However, when I do change directories, the prompt does not change ...
0
votes
2answers
315 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 ...
0
votes
1answer
94 views

Where do I put environment variables that I want set on boot (or login)? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? Where do I put environment variables that I want set on boot (or login)? In particular, I ...
7
votes
2answers
1k views

Why do I have three My Documents folders?

I'm trying to fix my profile on Windows 7. Currently %USERPROFILE% points to C:\Users\myUsername My Documents is also at C:\Users\myUsername \\profileServer\profiles$\myUsername has TWO "My ...
0
votes
3answers
85 views

How to retrieve environment variables from XP?

What is a way for a novice user to retreive the environment variables on an XP machine? I need to ask a user to do this but it needs to be very simple and easy to copy into an email.
0
votes
1answer
286 views

Set vim's internal shell path

I'm trying to configure the $PATH env variable of vim's internal shell. I have commands that update the $PATH several times during a session. I see that vim inherits my shell's first $PATH - but not ...
1
vote
2answers
535 views

Windows 7 environment variable not removable

I installed MKS on Windows 7 and with it MKS Toolkit was silently installed. This also seems to set some global environment variables like "TERM" and "TERMCAP". As these variables won't work together ...
3
votes
1answer
356 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 ...
2
votes
1answer
431 views

Environment variables have different values depending how CMD.exe is launched

I have a command setup in the Registry as a folder association, so I can shift + right-click any folder and open a VS2010 prompt there, instead of having to open a command prompt and then CD to the ...
1
vote
1answer
251 views

Setting HOME variable in RHEL6 system wide

Where does the HOME variable get set in RHEL6 (SL6.1)? On one system all users get HOME set to /home/username/, i.e. with the trailing slash, which I don't want, so I need to remove it.
2
votes
3answers
1k views

Launch Windows program with custom environment variable

My JAVA_HOME on my dev machine - which is Windows 7 Pro 64 Bit - points to a 64-bit Java, and that's fine in general. However, I just installed a program - to wit, the FlashDeveloper IDE - for which ...
0
votes
0answers
113 views

Show the %username% for the logged in user in an elevated command prompt instead of elevated users %username%?

On a Windows Vista Business machine, I have Windows Task Scheduler task set to run everytime any user logs in. The task runs as a certain elevated admin user because the script is being executed from ...
2
votes
1answer
964 views

How do I see a list of all currently defined environment variables in a Linux bash terminal?

In a linux bash terminal, there are often many environment variables that have been set, like $PATH and $HOME. Is it possible to see all of the environment variables that have been set? How?
1
vote
1answer
90 views

Accessing external HDD on different Windows computers with the same path

I have a external HDD and have a folder in it called icons\ which stores all the custom icons (yes, I'm nostalgic!) for the different folders on my drive. But when I open my hard-drive on a different ...
0
votes
1answer
256 views

Environment Variables and Shell Rc File [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I am trying to automatically establish a connection with Amazon s3 using keys. This ...
0
votes
2answers
176 views

Passing optional extra environment settings to the shell at Konsole launch time

I have a bunch of different "hats" on my computer, including multiple on-the-go projects (e.g., $work, a few projects on github, some on Sourceforge, some I'm involved with, some I just follow, etc.). ...
0
votes
1answer
75 views

COMP_LINE not set despite bash completion being installed

I'm using homebrew's bash completion package on OSX, which is installed in /usr/local/etc/bash_completion. It's working fine, but there are many extensions for it which rely on various environment ...
2
votes
1answer
3k 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 ...
2
votes
1answer
178 views

Java: compile and run hanging at command prompt

I'm having an issue that I'm hoping someone can help with. I'm working on netbook running WinXP Pro SP3, 1.6GHz & 1GB of RAM. I've got a relatively simple java program that I'm able to ...
2
votes
2answers
510 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 ...
7
votes
2answers
7k views

Environment variables in bash_profile or bashrc?

I have found this question [blog]: Difference between .bashrc and .bash_profile very useful but after seeing the most voted answer (very good by the way) I have further questions. Towards the end of ...
1
vote
1answer
711 views

HOMEPATH not defined when running cmd as administrator (Windows 7 x64)

The application I want to use needs the HOMEPATH environment to be set in order to work flawlessly. It's usually no problem because it's set by default. Here's the cmd dump: C:\Users\xxxx>set home ...
1
vote
2answers
853 views

Win7: messed up system - set too long path variable

I just messed up my Windows 7 Enterprise 64-bit. I tried to install CMake - and during installation i got an error saying something like it can't set the path variable, because it is too long (I ...
0
votes
0answers
119 views

Maintain select Windows environment variables in text file

I'm working on several Windows computers (mostly Win7) and like to carry my configuration around with me. That configuration is mostly development stuff, like: Where is the main Mercurial repo on my ...
3
votes
1answer
757 views

Will PROCESSOR_ARCHITECTURE Environment Variable Identify as 32 Bit on a 64 Bit Machine with a 32 Bit OS Installed?

If I had a 32 bit version of Windows installed on a 64 bit capable machine, will the following command return "x86"? echo %PROCESSOR_ARCHITECTURE%
3
votes
1answer
416 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 ...
1
vote
2answers
2k 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 ...
1
vote
1answer
534 views

How can I find out where an environment variable (like PATH) was set?

I have a xterm with the bash shell in linux. When I echo $PATH, it is showing a directory and I want to know who put this directory in the PATH. How can I find out? Thanks!
0
votes
1answer
145 views

Is there a “FORCMD” variable (like “DIRCMD”, “COPYCMD”, etc.)?

The dir command checks for a dircmd environment variable for default arugments to use. Likewise, the copy and move commands check copycmd. Is there a corresponding variable (by any name) for the for ...
0
votes
1answer
36 views

How can you use the domain of the client connected over ssh in the shell?

Is it possible to get the users ip address, domain name, or host-name of an established ssh connection in the shell? For example, when I connect over ssh the first printed line says something like ...
0
votes
1answer
3k 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 ...
2
votes
0answers
153 views

Git, Powershell, %HOME% and multiple repos

I'm going to start off by saying that I'm not particularly good with either git or Windows. However, I've been successfully using msysgit on Windows 7 for a while now, keeping track of a number of ...
9
votes
1answer
5k views

How can I permanently append an entry into the system's PATH variable, via command line?

What I need to do: Append a folder to the %PATH% environment variable at the SYSTEM level. Make the change permanent. How I need to do it: Using the command prompt, or another method by which ...
2
votes
2answers
389 views

In which places is the Windows %PATH% defined? [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I ran a third-party install script which added its folders to the %PATH% variable in the ...
0
votes
1answer
69 views

Where was environment variable set?

I've an environment variable ($M2_HOME) which I'd like to modify. The thing is, I can't find where I originally set it - this is quite bizarre as I exclusively use ~/.bash_profile. Are there any ...
10
votes
4answers
3k views

Overcoming the 1024 character limit with setx

I am trying to set environment variables using the setx command, such as follows setx PATH "f:\common tools\git\bin;f:\common tools\python\app;f:\common tools\python\app\scripts;f:\common ...
1
vote
1answer
406 views

Environment variable set in batch isn't expanded in shortcut

How can I make my environment variable (set in batch file) visible in application executed right after setting this envvar? Here's the scenario that I use: In my external script (not quite ...
2
votes
2answers
322 views

Variable Names Between Called Batch Files

Let's say I have two batch files, foo.bat and bar.bat, that are located like so: root\foo.bat root\grub\bar.bat Let's also say that both files contain a line that sets a variable, like so: set ...
2
votes
1answer
868 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 ...
1
vote
1answer
293 views

Copying Environment Variables in Windows XP

How can I copy the value of an environment variable into another environment variable? I'm updating a DOS batch script for use on Windows XP. Let's say that I have environment variable FOO, which ...
1
vote
1answer
54 views

Gentoo Linux global environments for root

I'm confused with setting variables in /etc/env.d directory. When I write "echo $PATH" from user - it's print me all variables that set it myself. But from root I see one... Where should I set ...
0
votes
1answer
316 views

Shortcut target maximum character exceeded

Is there a way to manage the limit of character in target in shorcuts? I need to add more commands in a target (to set environment variables) and I can't!
0
votes
1answer
195 views

Getting man path through Vim

So, I've set up Vim as my default man viewer. I also have NERDTree starting up automatically - but I could really do without NERDTree showing the location the man pages every time I check man. I've ...
1
vote
0answers
180 views

Creating a shortcut in launcher to run a terminal command with more than one parameter as argument

How do you create a shortcut in launcher that lets you run a terminal command using more than one variable? For example, how do you create a launcher shortcut that will prompt you for varA and varB ...
0
votes
1answer
85 views

What environment does an application run in if started via desktop shortcut?

I have noticed that the environment variables I export in my .profile or .bashrc files are not available to applications started via a desktop shortcut. At least to my IDE. They are available if I ...
2
votes
1answer
576 views

How can I add directories to the PATH only for instances of CMD.EXE in Windows 7?

I don't want to modify the system path in Windows 7, or the user path either. But when I start up a Command Prompt (cmd.exe), I would like the path within the command prompt to be modified to include ...

1 2 3 4 5 7