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
33 views

Pipe in Environment variable in fish shell doesn't execute the first command?

I want to set fish_greeting to date --rfc-2822 | cowsay -f tux | lolcat (don't judge me). When I run date --rfc-2822 | cowsay -f tux | lolcat interactively, I get the proper output (the date in a ...
1
vote
1answer
35 views

What is the name of the tool that allows one to manipulate environment variables?

For some bizarre reason our corporation has disabled access to modify our own environment variables, they've actually set every single modifiable group policy to disallow us from doing anything, ...
0
votes
0answers
46 views

After adding vboxmanage to PATH, getting “ 'cmd' is not recognized as an internal or external command”

Am trying to add virtualbox exe's to the windows PATH. But after adding "C:\Program Files\Oracle\VirtualBox" to the PATH env am getting the below error. And most of the usual commands are not working....
2
votes
2answers
434 views

Name “wmplayer” is not recognized as an executable file

I cannot run wmplayer from either cmd or PowerShell. My OS is Windows 7 64 bit. I can do it using start wmplayer but I cannot use parameters. Please, help me to handle it.
1
vote
1answer
59 views

Providing API Keys at Runtime for Chromium doesn't work

I installed Chromium for mac OS X. When I launched the browser, I got a message stating "Google api keys are missing". I followed the instructions on the "Chromium developers how-to". I have ...
37
votes
10answers
26k 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 ...
4
votes
1answer
167 views

Windows Batch. Append to PATH Environment Variable, when It Contains Spaces

I want to add some binaries to path for my console session and I'm doing it like so if not defined WIXTOOLKIT_IN_PATH ( set WIXTOOLKIT_IN_PATH=1 set MY_PATH=%~dp0..\tools\wix SET PATH=%...
-2
votes
2answers
61 views

Path Environment Variable not working

Rephrased question I have an XP machine where I want to access an *.bat file from anywhere in my command prompt. As an example, let's say it's vcvarsall.bat from my Visual Studio 2010 directory. ...
1
vote
1answer
1k views

Setting Environment Variables on Mac OS X

I'm new to using Mac OS X. From my understanding, it uses Linux under the covers. I have a need to add an environment variable. Currently, whenever I start a terminal window, I've been executing ...
0
votes
2answers
30 views

Pass variable to another pane

I'm working with tmux and I'd like to pass some information from one pane to another. For example in first pane i've got the folder by pwd command and instead of copypast to another pane I want to ...
2
votes
1answer
5k views

Git is in the PATH, but is not being recognized as a command

I've recently reinstalled Git, and I just can't get it to run off the native Windows command prompt anymore. I'm sure it is in Path environment variable, as you can see: C:\Users\Ult>where git C:\...
1
vote
1answer
53 views

Git bash and cmd don't load my user account PATH variable

Start up a gitbash or a windows cmd session and run echo $PATH or echo %PATH% They both print the contents of the system PATH variable, but neither prints the contents of the PATH variable ...
17
votes
3answers
7k views

Updating screen session environment variables to reflect new graphical login?

I use linux, and I like to do all my command-line work within a single screen session, so that I can restart my graphical login and such without losing my terminals. However, when I log out and back ...
0
votes
1answer
29 views

Windows environment variables. How do I change the name that I must type at command prompt to run a path target

I am using Windows 10 Pro, but I'm sure the process is the same as Windows Vista through 8.1 or it's similar enough for me to figure out the minor differences. I have two programs with the same exact ...
0
votes
3answers
556 views

Environment variable in .lnk shortcut

I want to make a windows shortcut, which opens javaw.exe at a variable destination. This destination is the content of my system environment variable %MY_OWN_JAVA_HOME%. I tried to do: right click ...
2
votes
2answers
36 views

Read lines from a file into command window and expand variables

Im trying to see if its possible to read lines from a file into the command window and then write them back out to a file. The tricky part is that anywhere in the file where there is text resembling ...
4
votes
3answers
5k 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
41 views

PowerShell environment variable missing

I have the situation. One of PowerShell environment variable has been missing several times. I have to manually add it ($env:path +=';C:\Program Files\Docker Toolbox') and reboot my desktop. I am ...
0
votes
0answers
37 views

subshell variables not getting exported to parent shell

As part of porting scripts from HP-UNIX to RedHat Linux, I'm trying to set up config files accordingly. There is a scenario where the .profiles sources oracle env with SID as option to it, that in ...
0
votes
0answers
36 views

Source windows environment variables in MSYS

I have a setenv.cmd script which contains paths for the windows cmd prompt: set CURRENT_SCRIPT_DIR=%~dp0 set PATH=%PATH%;%CURRENT_SCRIPT_DIR%\bin But I'm using bash (via msys in the git for windows ...
0
votes
2answers
28 views

Evaluate each environment variable and set it back in ubuntu

I'm trying to write a shell script which reads all the environment variables, evaluate them for included env. variable with in them and re-export after evaluvation. Example - I've an environment ...
3
votes
0answers
32 views

Shortening Path variable

Currently, my path variable is way too long (as it seems to have been populated by different programs upon installation). I have pasted my path variable below, could you all please tell me if it is ...
0
votes
1answer
45 views

Path not being completely set in Windows 10

When I open a new cmd and print the path it is not match what is in the System > Advanced system settings > Environment Variables... I have two directories from my User variables and a bunch from my ...
0
votes
0answers
40 views

How do I read system environment variable in Windows 10 (without using admin right)

How to I read system environment variable in Windows 10 (without using admin right) my %JDK_HOME% = C:\Program Files\Java\jdk1.8.0_77 when i use command line echo %JDK_HOME% it will show %JDK_HOME% ...
10
votes
2answers
8k views

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

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

Sudo user is not able to export path of ant

Sudo user is not able to export path of ant. I am trying to execute shell script setpath.sh which exports path for ant. After executing the script when I am executing ant command then getting ant ...
0
votes
1answer
193 views

How to make an Environment Variable available to Systemd Services

I have a script in /etc/profile.d/setenv.sh which sets the value for JAVA_HOME so that $JAVA_HOME will be available system-wide: # echo "export JAVA_HOME=/usr/java/jdk1.8.0_74" > /etc/profile.d/...
0
votes
0answers
28 views

Cygwin command to set user path when logging in ssh

I've setup a sshd as a service on windows 7 with cygwin, choosing to create cyg_server to run it. Now I can login to my machine via SSH with my normal username, everything works, except what depends ...
1
vote
1answer
18 views

Replace shortcut path during creation (Windows)

I would like all new shortcut links created using the right-click option in windows explorer to replace the absolute path with a system variable. The motivation is to have synchronized shortcuts work ...
0
votes
1answer
35 views

How to remove environment variable

I am use Windows 10 pro. I try to run other Tomcat instance, but I cannot control config (%CATALINA_HOME%). This is systempropertiesadvanced (hasn't CATALINA_HOME variable): I try to echo by cmd (...
0
votes
0answers
43 views

When does %PATH% get expanded?

Ok so I'm pretty sure this question has been answered somewhere already, I'm just not able to find it within 30minutes. I have set some custom variables (system-wide) and added them to my system %...
0
votes
0answers
8 views

how to save URL passed variable for page reloads [duplicate]

i am developing a blog website first time, the problem is here: i am displaying a 150 characters of all post on single page, and when user clicks on a particular post of his interest that post gets ...
6
votes
3answers
9k views

How to update the PATH user environment variable from command-line

I have a system PATH variable with the system level config. I use the user PATH variable to complement the PATH with user-specific config. I would like to update the user PATH variable from command-...
10
votes
5answers
12k views

Wrong java -version being reported

I am running Windows 7 Professional x64 and have the following Java versions installed: x64 C:\Program Files\Java jdk1.6.0_24 jdk1.7.0_04 jdk1.7.0_07 jre6 jre7 x86 C:\Program Files (x86)\Java ...
0
votes
0answers
15 views

How to set user environment HTTP_PROXY variable depending on network attached?

I spend about half my time behind a corporate firewall with a restrictive proxy, and the other half on open outbound connections. When I am on the corporate network and use CLI tools through cygwin ...
0
votes
0answers
42 views

CMD doesn't update environment variables

When I edit the system environment variable PATH (or any other, I imagine) through Control Panel\System and Security\System > Advanced system settings, it doesn't update in CMD, even after ...
0
votes
1answer
235 views

CUDA program ignores CUDA_VISIBLE_DEVICES variable?

I'm using CUDA 7.5 on a machine with Ubuntu Server 14.04 and 3 GPUs: 2x Tesla K20C and 1x GeForce GT 630. I've tried to set the CUDA_VISIBLE_DEVICES to the according IDs so that the code only runs on ...
3
votes
1answer
272 views

How do you set environment variables for a single command on Windows?

Is there a way to set environment variables for a single command on Windows like ENVVAR=abc command on Unix? Variables set by set command on Windows seem to remain for the following commands, but ...
1
vote
2answers
25 views

Display the environmental variables seen by desktop applications

How can I know what environmental variables will be set when a desktop application (not bash or other command line shells) launches? Is there a utility tool?
1
vote
1answer
36 views

pass du (disk usage) result to a numeric variable

In a shell script, I'm looking for a way to pass the du (disk usage) result to a numeric variable, so that I cantie the execution of a shell script to the size of a specific folder. I've tried ...
0
votes
0answers
12 views

Environment Variable VS Registry [duplicate]

I'm confused about the usage of Environment Variables vs Registry. Is there best pratices on what to store where? For exemple, why have a PATH variable if I can read it from the registry? Thanks
19
votes
7answers
12k views

Adding an .exe to default path without adding the directory

For example, I want to add notepad++ to my PATH, however the directory also contains uninstall.exe and several other files/executables and I don't want them to "pollute" my path. Can I just add the ...
2
votes
3answers
2k views

Why cmder does not import the user path variables?

The path variable in the cmder only contains those paths imported form the system path variable. While in normal command shell, the system path and user path will be concatenated. I've found in the ...
43
votes
9answers
35k 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
36 views

How do I monitor changes made to environment variables ?

I have an environment variable whose value didn't match the one set by /etc/environment, even after reboot. I eventually found the auto-executed .sh script changing it, but that incident got me ...
5
votes
2answers
9k 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 ...
4
votes
3answers
6k views

LANG=C is in a number of the /etc/init.d/* scripts. What does LANG=C do and why do you need to set LANG=C.

Its not clear what it does or what it contains. I tried greping the out put of set and env to see what C or LANG are set to in other places on the systems. Nothing was clear about how it is used or ...
0
votes
0answers
23 views

using conditionals in environment modules

I am on a CentOS 6.6 system and I am trying to create some environmental modules. I have a package, HTSeq-0.6.1 that uses python and I wanted to have a conditional that checks the current version of ...
0
votes
1answer
65 views

Certain Variables won't expand in Windows System Environment Variables PATH [duplicate]

For some reason there are certain Environment Variables that won't expand when used in the "PATH" variable in the System Variables. For example, %SystemRoot% works just fine while %WinDir% doesn't. %...
0
votes
0answers
94 views

Why are my TMUX session options (set-option blah) always being applied globally?

Terse How can I set a different status-bg color in two different TMUX sessions? Why are environment variables acting unexpectedly in .tmux.conf? Verbose Different colors for the status bar I have ...