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
2answers
239 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
266 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
949 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
1k 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
47 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
161 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
65 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
22 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
255 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
204 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
953 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
267 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
158 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
421 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
67 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 ...
9
votes
3answers
7k 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
119 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
70 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 ...
0
votes
1answer
495 views

Set enviroment variable setx

I am setting a environment variable with setx(win7) in a cmd , that I started from a batch file, if I close the shell an open a new from batch file again and use Set command to check it, I do not get ...
1
vote
0answers
16 views

What is the BLAB_MEM environment variable in Windows?

On my Windows Vista system I see an environment variable called BLAB_MEM, with the value "-Xms128M -Xmx512M". This variable name is shown under both the system and user variables. That value ...
0
votes
0answers
156 views

Why is Eclipse/m2e not using my computer's PATH when executing command line Maven tasks?

My project uses a Maven build system, and the Maven build includes a command line call to thrift to compile some files. In bash, mvn generate-sources successfully completes. But when I use m2e's Run ...
0
votes
1answer
671 views

Scheduled Task and environment variables WITHOUT CMD /C

I need to run a task within Windows 2003 Task Scheduler however the command needs to access environment variables: vlc.exe http://62.196.56.141:8080 ...
0
votes
2answers
323 views

linux- env variables getting reset after closing the console

The env variables I set are getting reset to the previous values after closing the current instance of the bash console. How to set or unset those variables without getting them reset everytime? I am ...
0
votes
1answer
2k views

Strange Windows Errors

I run Windows 7 and I've been getting strange errors from different applications, for example attempting to uninstall VMware Workstation causes the following error: "Error in the lua script: [string ...
0
votes
1answer
330 views

Where Should I Set Environmental Variables For Use By Sublime Text 3

I have a Sublime Text 3 package that will only work if a particular environmental variable is set. The env is currently set in my .bash_profile, so if I launch Sublime Text from the Terminal, this env ...
1
vote
1answer
101 views

Where is file that saves Environment Variables?

I am a developer and usually do stuff with the PATH variable. However, now there are too much path in it, and using a short textbox of Windows is a pain. Before I happen to jump into a text file, ...
0
votes
0answers
166 views

Deleted Path environment variable, how to find the older Path?

I saw the other post like this and that, but i can't solve my problem, I opened regedit and find the previous version of folder USER <-screen, when i select/open it I can see the folder in the ...
1
vote
1answer
145 views

Don't have permission to set environmental variables via a script?

I've written a script to add some environmental variable required to run a certain process. I use it in this way >. ./env_change_script.zsh using the leading dot to indicate I want the script ...
3
votes
1answer
2k views

Too many folders in the path variable

I've encountered a strange issue - I can't launch Visual Studio, nor run simple commands from command prompt, seemingly due to my PATH variable being too long. Now that I look at it, I see that many ...
0
votes
2answers
644 views

Attempting to read data from a text file and inputting the variable text to a script

I have a file with 25 single word entries, I need a script to read through the file one line at a time and input the variable phrase into a second script that will generate a individual file based on ...
8
votes
4answers
3k views

Finding IP or hostname of origin machine (ssh)

I connect to a number of machines constantly, from different physical locations (and thus different physical machines). Most of this is done though ssh, sometimes a gateway machine or two is required ...
0
votes
1answer
112 views

Save vim tabs without saving vim environment / Reload vim environment

My vim environment occasionally becomes corrupted because of plugin/user errors (e.g. :bdelete in the NERDCommander window), and I'd like to "reload vim". :mksession allows vim to "save" tabs for ...
1
vote
1answer
2k views

Why is my PATH environment variable different from the command prompt?

A bit of important background: my company has a generic login VBS script that makes modifications to the user PATH environment variable upon login and allows me to run software that has dependencies ...
0
votes
1answer
111 views

Environmental variables in login shells and interactive shells

I'm sort of confused of login shells and interactive shells. If I run ssh my_remote_server 'echo $HOME' I can get /home/shawk But when I run ssh my_remote_server 'echo $ANOTHER_VAR' I got a ...
1
vote
1answer
449 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, ...
0
votes
3answers
69 views

How install python when java is still there on the computer?

I need to install python in my computer. I searched some articles on the internet and it says to set the environment variables as follows. set path=%path%;C:\Python27\ So the problem is that the ...
1
vote
2answers
73 views

zsh AUTO_NAME_DIRS doesn't work for certain variable names on OSX

I have a wierd problem with my zsh on my OSX 10.8 (with oh-my-zsh, which I think has AUTO_NAME_DIRS set for me). Normally if I set up an environment variable to some path by export ...
0
votes
1answer
240 views

What is the difference between setting the path via editing /private/etc/paths vs ~/.profile?

I just found out I can edit my PATH by editing /etc/paths or /private/etc/paths, or by putting export PATH=$PATH:/a/path in ~/.profile or one of my other startup scrips. Is there a difference between ...
1
vote
2answers
2k views

How do I create a Python 3.3 environment with Anaconda (& Windows)

I installed Anaconda on my Windows XP machine about a week ago. It came with Python 2.7. I am trying to create a Python 3.3 environment on it. I followed these directions, resulting in downloading ...
0
votes
2answers
4k 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 ...
1
vote
1answer
370 views

Exporting bash functions through ssh

So I found a way to transfer environment variables through ssh without having to change neither server nor client: Transferring environment variable through SSH / quoting in bash/sh/csh/tcsh But I ...
2
votes
2answers
301 views

What does // and :: in the values of environment variables mean?

On my Linux machine some of the environment variables contain lists of directories. The directories are separated by :. But sometimes they are separated by ::. Is it just a mistake that should be ...
0
votes
1answer
228 views

How can I permanently add a new path to the 'PATH' environment variable of the current user on Win 7? [duplicate]

I'm working on Windows 7. How can I permanently add a new path to the 'PATH' environment variable of the current user? I tried to do so with wmic: wmic ENVIRONMENT where "name='Path' and ...