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

delete items from path environment variable

I have a question regarding editing the path environment variable on my windows 7 Machine. I have been editing my path using SystemPropertiesAdvanced.exe's dialog window, but the changes i make are ...
0
votes
0answers
10 views

Bash filename tab completion when an environment variable is present

When I use tab completion on a normal path like this: vim /home/tester001/di<tab> it correctly expands to: vim /home/tester001/directory_1/ and I can continue like this: vim ...
1
vote
0answers
17 views

How to add Visual Studio code to path variable?

My path variable had corrupted which I have fixed now. But during the process, I lost some of the original entries in the path variable. I specifically want to add entries for visual studio code and ...
0
votes
1answer
28 views

Can I use shortcuts from a directory in PATH?

I'd like to have a directory, add it to my PATH, and put shortcuts to executables in it. I've done it in a Linux and it worked so wonderfully, but it doesn't seem to work on Windows -- it just can't ...
0
votes
1answer
20 views

Installing extensions of a program that is installed twice

I have Python installed twice in my computer. The python.exe file is located once under C:\Python34 and again under C:\Anaconda3. The first was installed through the standard Python installation, ...
1
vote
1answer
19 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 ...
1
vote
3answers
50 views

To whom do environment variables belong?

From several websites I read that getenv is a system call. However I cannot find any reference to sys_getenv. I am trying to understand what "environment variables" are, exactly. Are they part of ...
2
votes
1answer
24 views

Why does ZSH local variable assignment fail?

I was reading this question and answer: zsh - variable assignment isn't working. The post explains how to fix it, but not why. Why does the local variable assignment fail in that case ? There ...
0
votes
0answers
31 views

call environment path commands from powershell

I can call any executable included in the environmental variable path from a command prompt by simply calling its name. However when i try to do the same from Power-shell I get an exception the ...
0
votes
1answer
32 views

'git' is not recognized as an internal or external command, operable program or batch file

I'm reciveing this error when trying to install something which uses 'git' command. I've already installed git and put the directory into my environment variable - C:\Program Files (x86)\Git\cmd I've ...
0
votes
1answer
29 views

How to handle Permission denied on source command?

I am trying to persist my java environment variables to the system and I'm having trouble with the following: :$> source java.sh -ksh: source: cannot create [Permission denied] What is the ...
0
votes
1answer
38 views

Start command inside xterm with login shell, over SSH?

I'm trying to use ssh to remotely start an xterm that runs a command inside a non-interactive login environment with a file that sets up the environment that is in a non-standard location. Anybody ...
0
votes
4answers
53 views

Pinging using a variable

I'm trying to create a batch file that will ping a variable that is determined by the users input e.g. "Enter PC Name:" pc name =123 Then it pings 123.domain.com @echo off set /p UserInputPath = ...
3
votes
2answers
39 views

Can I delete (apparently) redundant elements between my two Windows PATH variables?

For some reason--and I'm not sure if this is standard on Windows--I've got 2 PATH variables in my Windows System settings under Environment Variables. Can I delete from one of them anything that ...
0
votes
2answers
34 views

Is there an equivalent to source which allows me to have a batch script alter environment variables of the parent bash process?

My situation is this: I use python with conda on a windows machine, and work mostly in cygwin when on the command line. Now conda allows for different python environments, similar to virtualenv, but ...
15
votes
1answer
892 views

What is the difference between SETX and SET in environment variables in windows

What is the difference between SETX and SET? As per my understanding: Both are used to set environment variables SETX is for global variables. SET is for local variables. Is it correct?
1
vote
1answer
38 views

In what order does GNU env print environment variables?

When invoked without arguments, the env and printenv commands from the GNU Coreutils print the value of every environment variable. What determines the order in which these variables are printed? ...
2
votes
3answers
70 views

Can I change my PATH dynamically based on my cwd?

I would like to change my $PATH environment variable dependent on my current working directory. Say I'm in /foo/bar/baz and I have the directories /foo/node_modules/.bin and ...
-1
votes
3answers
89 views

Commands not executed with %comspec% /k

I am trying to execute a .bat file with a set of commands which can be executed individually through the command line, but not all together through the script: %comspec% /k ""C:\Program ...
1
vote
2answers
168 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 ...
1
vote
1answer
55 views

Evaluate %PATH% as the system-scope environment variable exclusively

In Windows' command line, echo %PATH% appears to merge the system and the user variables PATH in such order before printing. That seems reasonable, but I would also like to be able to print only the ...
1
vote
2answers
50 views

Why does the set command display more environment variables than the environment variables gui?

When I run the set command in command prompt the first variable I see is But when I open my Environment Variables GUI I don't see ALLUSERSPROFILE Why is that? There are numerous other ...
5
votes
1answer
188 views

Powershell: A variable within a variable; Variableception

So the easiest way to explain my problem is for me to show you this simplified version of what I'm trying to do: PS C:\> $a = 'hello' PS C:\> $a hello PS C:\> $b = '$a world!' PS C:\> $b ...
0
votes
1answer
49 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 ...
1
vote
1answer
56 views

MAC equivalent - user name & appdata

I have a couple of questions: On PC I can get the username from the environment variable USERNAME and on LINUX it is USER - what the MAC equivalent? The users local area on windows can be found via ...
1
vote
1answer
23 views

Should system path & user path match?

This morning I was trying to add python to my windows 7 PATH and used: setx PATH "%PATH%;C:\python34\" /M This seems to have changed my path but not in the manner I'd hoped! My user path now ...
1
vote
1answer
72 views

How to call environment variables in runas command for right click context menu

I am having trouble with using environmental variables with using runas when using the command in the registry for a right click context menu command. I have tried different methods of escaping the ...
1
vote
1answer
46 views

Windows 8 Can't find executable in path with “where” command

I added the following line in my System Variable Path "C:\Program Files (x86)\FontForgeBuilds\bin" I can then run fontforge: C:\Windows\system32>fontforge -v Copyright (c) 2000-2014 by George ...
1
vote
1answer
191 views

Do I need SQL Server paths in my PATH environment variable for it to work?

SQL Server adds things to my PATH environment variable, and over time that bloat makes me hit the 2048-char limit in Windows 7. Do I really need them there for SQL Server to run? This is on a ...
1
vote
1answer
26 views

Run a function from bashrc, but modify exported variable

I am trying to run a function from my bashrc that refreshes every minute and externalizes a variable. It looks like this: export CFN = '' _some_fn { export CFN = 'test' sleep 60 _some_fn ...
0
votes
2answers
57 views

How to echo string of another string shell variable

We would like to echo the value of a shell variable which has another variable string in its variable name. eg: we want the following output var1=1 var2=2 We tried several various forms similar to ...
0
votes
0answers
27 views

Can't change system variables from config files on MariaDB/MySQL on Linux

I want to change two system variables on my MySQL testing server, namely collation_server and collation_database from latin1_swedish_ci to utf8_general_ci, because its annoying that everytime I create ...
0
votes
2answers
26 views

All the Environment variables have been deleted in my Win7 64bit [duplicate]

I have overwritten all the paths in environment variables. . How can i restore those variables back.
0
votes
1answer
27 views

Cronjob: Iterate through files

I want to iterate through a list of bash scripts with a cron-job. I.e. every two hours I want to start another bash script. My idea was to set a new environment variable, each time the cronjob script ...
1
vote
1answer
39 views

batch current directory when starting as administrator

Background: I like to have my computer clean. Especially I don't like programs and services starting with my windows, but I still want to use all my programs without having to manually start ...
0
votes
1answer
29 views

Weird behaviour while editing “Environment Variables”

If you take a look at the following screenshot, you see 2 very similar "Environment Variables" menus. The one the left was accessed by: Computer->Properties->Advanced System ...
2
votes
2answers
44 views

Setting the variable $USERNAME has no effect

Setting the variable USERNAME has no effect. Accessing the variable always returns the current logged in user. james@localhost:~$ USERNAME=foo james@localhost:~$ echo $USERNAME james I could not ...
0
votes
0answers
41 views

How to set truly global environment variable?

I am working on a Mac and I tried setting them in /etc/launchd.conf and tried running a Java program from shell and the same program from Eclipse. I get two different outputs for System.getenv() in ...
1
vote
1answer
55 views

Why is my IP address appearing in the email header even though I am using a proxy server?

When I visited a proxy-check site accessing through a proxy server, I found that my true IP didn’t appear. But in the header of the mail that I sent—using Thunderbird—accessing through the same ...
1
vote
1answer
41 views

Is it possible to have the PATH environment variable update without logging off?

In Windows 8.1, if I change the Environment Variable for PATH under either System or User and open a command prompt and execute path, whatever I appended to PATH is not shown unless I sign out of my ...
2
votes
0answers
18 views

What is the path environment variable? [duplicate]

I just started with using the (Windows) command line tool for working with npm. And I end up quite often on StackOverflow when I'm stuck with some error and the solution is often to add [something] to ...
0
votes
2answers
58 views

How can I set up an environment variable to work with TCC?

I am trying to set up TCC on Windows 7, but I can't seem to make it work dynamically from cmd To be able to invoke the compiler from everywhere on your computer by just typing "tcc", please add the ...
0
votes
1answer
57 views

Unable to open display to specific user in Red Hat 6.4

I am trying to install Oracle database 11g in my Red Hat 6.4 and the installer aborts with a warning followed by an error message: Warning ">>> Could not execute auto check for display ...
2
votes
1answer
200 views

What is the scope of “exported” in Unix shell variables?

I have set some environment variables in the following way: MY_VAR='helloworld' export MY_VAR Then I have switched to another user via su SOME_OTHER_USER I echo the MY_VAR variable.. and I see ...
0
votes
1answer
41 views

Is it possible to substring an environment variable in a windows 7 shortcut? [duplicate]

If I have an environment variable in Windows such as %username% if there any way I can substring that? I'd like to substring it down to the first 8 characters.
0
votes
1answer
61 views

Why is the directory Windows/Temp used instead of the Local user Temp when using %TEMP%

After installing my system in a new season of work, you must create a mechanism to actualize the same. This mechanism of this command line: schtasks /CREATE /SC onstart /DELAY 0015: 00 /TN "AppName ...
0
votes
2answers
64 views

Append to System PATH variable without including the User's PATH variable

Imagine the following environment variables: System PATH = C:\Windows Bob's User PATH = C:\Users\Bob In a command prompt the PATH command returns C:\Windows;C:\Users\Bob After running setx /m PATH ...
1
vote
1answer
1k 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
2answers
93 views

How do you create system variables via batch file for Windows 7?

How can I create a batch file which creates a new system variable? (You know, in advanced system settings > environment variables > System Variables). I want to create a new variable named ...
1
vote
3answers
106 views

Cannot resolve %windir% on Win 7 64-bit

I'm having a problem with my laptop, it can't resolve the %windir% environment variable. I checked on the net and find that the PATH variable must be under 2024 characters length. Mine is 3145. ...