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

What is the preferred way to set environment variables at emacs initialization?

For instance, suppose I want to modify my PATH variable in my .emacs file. What is the best way to do this? Should I call setenv? Is there a variable I can customize? Should I call a shell script
1
vote
2answers
112 views

Security issues related to storing secrets in scripts

Let's say you have a program you want to run unattended, as root, which requires a secret (such as a passphrase; something you don't want other people to find out), which can be read from an ...
9
votes
7answers
25k views

Setting or modifying a (system wide) environment variable in cmd.exe

I am looking for a convenient way to add and/or modify and/or delete an environment variable from the command line. Particularly, I find myself at times in situations when I have to add a few ...
2
votes
4answers
292 views

Is there an easy way to edit enviroment variables in windows xp?

I wish to be able to edit my environment variables in a more user friendly manner than the Start Menu >My Computer>(right click)Properties>Advanced(tab)>Environment Variables ... and then ...
2
votes
4answers
7k views

Setting “~” as variable for %HOMEPATH% in Windows (7 or other versions)

I've been using various linux distributions for quite some time now and become accustomed to using the "~" key to indicate "home" when typing in paths. Today, working in Windows 7, I found myself ...
14
votes
13answers
54k views

Windows command-line: create a file with the current date in its name

I'm trying to create a zip file from a batch script. I need it to be named like archive_.zip Unfortunately, this doesn't work on systems with the date formatted like y/m/d because of the slashes: ...
5
votes
4answers
4k views

Irssi settings and Bash's Environment variables

How can I define settings, such as ircname, nick and such things, in .bashrc for Irssi?
1
vote
2answers
4k views

invoke program from CMD, with path contains white space

C:\Documents and Settings\js>echo %JAVA_HOME% C:\Program Files\Java\jdk1.6.0_11 C:\Documents and Settings\js>cd %JAVA_HOME%\bin C:\Program Files\Java\jdk1.6.0_11\bin>%JAVA_HOME%\bin java ...
3
votes
1answer
2k views

System-wide environment variables for zsh on Ubuntu

I'm using Ubuntu 9.04 I'm trying to add some system-wide envvars, I want them to be visible to both bash and zsh(my main shell), I added them to /etc/profile but unfortunately I can't see them in zsh ...
6
votes
5answers
2k views

When I run an app from the cmd-line, how do I find the exe's path?

When I run an app from the DOS Prompt in Windows, the command in question is often not in the current directory, but is found via the PATH environment variable. What's the quickest way to find the ...
9
votes
8answers
5k views

$PATH in Vim doesn't match Terminal

I'm using MacVim and when I don't launch it from the Terminal (mvim) its $PATH does not include what I have set in my .bash_profile. It only seems to have the default values, ...
5
votes
6answers
7k views

Why does my LD_LIBRARY_PATH get unset launching terminal?

I have a shell script to set up some environment variables and launch whatever program I send in as an argument: export PATH=$HOME/local/bin:$PATH export ...
22
votes
14answers
39k views

Why can't Windows handle an environment variable in Path?

My colleague and I have identical Dell workstations with Windows XP Professional x64 edition installed. My Path environment variable starts with: %JAVA_HOME%\bin;... My colleague's Path variable ...
80
votes
4answers
84k views

Change environment variables as standard user

When clicking on "Advanced system settings", I need to login as the administrator and hence only edit the administrators environment variables (in addition to the machine wide ones). How do I edit the ...
1
vote
3answers
996 views

Set environment variables from within a bash shell

Is there a way to set environment variables from within a (bash) shell script? I want to set some environment variables on some servers using a small script rather than typing. Some forum posts ...
11
votes
4answers
10k views

How do I set an environmental variable for a GNOME session?

On my system, for apps that use SDL, I need to set an environmental variable: export SDL_AUDIODRIVER=alsa to get the sound to work properly. How do I set up my GNOME session so that this variable ...
34
votes
4answers
2k views

Difference between “a=b” and “export a=b” in bash

What's the difference between: a=b and export a=b In bash? I understand that they both define environment variables, but I don't fully understand the difference.
14
votes
9answers
7k views

Is there any command line tool that can be used to edit environment variables in Windows?

Is there any command line tool that can be used to edit environment variables in Windows? It would be nice if this was smart tool, for example: When adding some path to let's say the PATH variable ...
2
votes
3answers
20k views

javac command not found

I am trying to compile a java program I found on the internet and it says that I must check if javac is installed. I installed the JDK a long time ago so it should be working but I get command not ...