A set of dynamic variables that can affect the running processes.

learn more… | top users | synonyms

269
votes
16answers
353k views

How to add a directory to my path?

How do I add a directory to my $PATH in Ubuntu and make the changes permanent?
27
votes
4answers
58k views

How do I set environment variables?

I'm trying to set up Apache Tomcat on my pc, and it wants me to set up an environment variable for CATALINA_HOME. Does any know how to do this?
51
votes
4answers
67k views

Why ~/.bash_profile is not getting sourced when opening a terminal?

Problem I have an Ubuntu 11.04 Virtual Machine and I wanted to set up my Java development environment. I did as follows sudo apt-get install openjdk-6-jdk Added the following entries to ...
10
votes
2answers
22k views

Setting the PATH so it applies to all users, including root/sudo

The instructions in How do I set PATH variables for all users on a server? work to set the PATH for all 'normal' users. However, if I do sudo -s and then printenv PATH the updated path is not shown. ...
18
votes
4answers
31k views

Where to declare environment variables?

What are correct places for: Global environment variables meant to affect all users? User-specific environment variables?
16
votes
2answers
7k views

What are “$PATH” and “~/bin”? How can I have personal scripts?

What is $PATH? How can I have commands/programs which are only available for me? I have seen this path ~/bin mentioned before, but what is it used for, and how do I use it?
35
votes
5answers
49k views

How to list all variables names and their current values?

Including not only $HOME, $PWD etc but any other you have defined.
13
votes
2answers
26k views

How do I set PATH variables for all users on a server?

I just finished installing LaTeX for my company's Ubuntu server that we all SSH into to use. At the end of the install it says this: Add /usr/local/texlive/2010/texmf/doc/man to MANPATH, if not ...
11
votes
2answers
17k views

Environment variables when run with 'sudo'

As example to my question, my ~/.bashrc file contains this lines: > export LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH > export LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so ...
6
votes
2answers
5k views

How to open ~/.pam_environment?

I wanted to set environment variables JAVA_HOME and PATH. So I wanted to open ~/.pam_environment since it is the best place to set environment variables relevant to a particular user according to the ...
21
votes
3answers
20k views

How do I modify my PATH so that the changes are available in every Terminal session

I want to add a directory to search my search path. I know I have to modify the $PATH environment variable. However, I want the change to be permanent, so that it is always in effect, for every ...
16
votes
1answer
82k views

What is PATH environment variable and how to add it

I just installed picc-9.82.9453-linux.run from Microchip website, and at the end it asked me ==> NOTE: You may wish to add the following /usr/hitech/picc/9.82/bin to your PATH ...
4
votes
1answer
362 views

How to know which processes have the DISPLAY variable set?

Sometimes I face some problems in display and mostly I do want to know which files or processes are using the DISPLAY environment variable. So how to list all processes that having DISPLAY set?
5
votes
1answer
1k views

Why is overriding the LANG environment variable not changing the language for me?

I'm trying to run an application in another language as my current environment. To start out simple, I wanted to change the language of ls. Here's what I read all over the place (see below for ...
0
votes
1answer
281 views

How to read the password from variable?

I am trying to move my file to another system which is located in some other place, with this command: rsync -avrz src destination It works fine. But what I need is to put this command in shell ...
24
votes
3answers
42k views

BASH script to set environment variables not working

I've written the following script to set some environment variables when needed. #!/bin/sh export BASE=/home/develop/trees echo $BASE export PATH=$PATH:$BASE echo $PATH Below the command and the ...
15
votes
3answers
43k views

How to configure ADB access for Android devices?

I'm using Ubuntu 12.10 and I have installed Android SDK, set it's path in my user .bashrc and it works. The problem is that my phone requires adb to be ran by root for permissions, but running adb ...
7
votes
3answers
10k views

Add bash script folder to path?

I have some bash scripts in an application folder that I'd like to use as if they were on my path. If they were straight-up applications, I'd just add the directory to ~/.bashrc, but these are ...
6
votes
1answer
4k views

Expand variables in upstart script

I have written several upstart scripts to start transmission-daemon for several users. The script is this: start on (local-filesystems and net-device-up IFACE=eth0 and runlevel [235]) stop on ...
16
votes
1answer
5k views

Set variable in .desktop file

Is there a way to set the enviroment variable in .desktop file? I'm trying to run application (eclipse) with custom gtk style, so basically I want to get the following result by runing a .desktop ...
6
votes
2answers
3k views

Referencing environment variables *in* /etc/environment?

I recently discovered /etc/environment, which seems a more standard way to setup simple environment variables than scripts, but I was wondering if there was a way to back-reference environment ...
4
votes
2answers
16k views

How set CLASSPATH variable for a folder in Ubuntu

I know that export CLASSPATH=/usr/local/java/tools.jar:$CLASSPATH will add tools.jar to the CLASSPATH, but i want to set folder to the CLASSPATH like this export ...
4
votes
2answers
17k views

Why doesn't apache2 respect my envvars file?

My envvar files has these lines in it: export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=www-data My apache2.conf has these lines in it: # These need to be set in /etc/apache2/envvars User ...
12
votes
3answers
10k views

Configuring Firefox to use a proxy from the command line

I'm looking for a way to tell Firefox to use a proxy in Ubuntu Ludid (10.04.1 LTS). I'm installing Ubuntu semi-automatically on several identical machines. For this, I use a script that, amongst ...
10
votes
1answer
998 views

Is there an environment variable that is set for Unity?

My script needs to be able to detect if the Unity is being used on top of the Gnome DE. The only other way I can think of is basically seeing if the config file is there.
9
votes
2answers
8k views

How do I set persistent environment variables for root?

To create persistent environment variables, I add the script file to /etc/profile.d directory, for example: # my script export MY_VAR=var_value This works properly for current user: ...
3
votes
2answers
2k views

PATH is not affected by .pam_environment

Running Ubuntu 13.04, I'm trying to add variables to PATH for the session, which is recommended to do inside .pam_environment, but nothing seems to work. Here's what it looks like: JAVA_HOME ...
16
votes
0answers
4k views

How do I set a path permanently? [duplicate]

Possible Duplicate: How to add a directory to my path? I am trying to install the play framework permanently. http://www.playframework.org/documentation/2.0.2/Installing export ...
2
votes
2answers
62 views

How to get the directrory name in shell script

I have a script which sets some environment variable to paths: export VAR1=/home/xyz/DIR_IN_WHICH_THIS_FILE_EXISTS export VAR2=$VAR1/abc/qwe ... Can I use something to get the ...
1
vote
2answers
517 views

How to include environment Variable in launcher for icon

This is an extension to the question how to include an environment variable in the launcher? . This question explains how to use the environment variable for the Exec part of the .desktop file but not ...
1
vote
2answers
1k views

Why the value of $PATH is different for root and normal user?

for normal user I get : /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/monty/google_appengine which is actually the ...
0
votes
1answer
122 views

How to fix invalid identifier error after setting environment variables?

I'm trying to setup cocos2dx in Ubuntu 14.04 LTS but after setting the environmental variables (in .bashrc) I start getting this error: bash: export: dev/cocos2d-x-3.2/tools/cocos2d-console/bin': not ...
10
votes
2answers
52k views

How to permanently set environmental variables PATH and M2_HOME in ubuntu for maven3?

I have downloaded the latest apache-maven3.zip file and extracted it to the folder: /home/gaurav/Java/maven3. I don't know how to set the environmental variables for maven - such as PATH and M2_HOME. ...
19
votes
4answers
7k views

Bash auto complete for environment variables [closed]

The bash autocomplete feature does not seem to work with environment variables in 11.04. The current behavior is indicated below export SCRIPT=/home/user/script cd $SCRIPT/<tab> results in a ...
12
votes
4answers
7k views

Setting TeX Live path for root

I have installed TeX Live 2011 vanilla and I have trouble setting the TeX Live path for root (in Ubuntu 11.10). The problem is that when I run sudo tlmgr I get: sudo: tlmgr: command not found To ...
18
votes
3answers
376 views

What is the $BASH_COMMAND variable good for?

According to the Bash manual, the environment variable BASH_COMMAND contains The command currently being executed or about to be executed, unless the shell is executing a command as the result of ...
8
votes
2answers
2k views

Is there a difference between “.” and “source” in bash, after all?

I was looking for the difference between the "." and "source" builtin commands and a few sources (e.g., in this discussion, and the bash manpage) suggest that these are just the same. However, ...
2
votes
3answers
2k views

How do I set an environment variable in a Unity session?

As a work-around to an issue with ibus, I'm trying to unset the variable $IBUS_ENABLE_SYNC_MODE. I have tried placing "unset IBUS_ENABLE_SYNC_MODE" in various places including: .profile .bashrc ...
1
vote
2answers
22k views

How to set JAVA PATH in Ubuntu 12.04?

So java -version give path not found. I have tried the following: Edit: ~/.bashrc ~/.profile /etc/environment bash.bashrc files and add to them the following: ...
10
votes
5answers
12k views

difference between bash.bashrc and /etc/environment file

Till data I was used to set my environment variables in the bash.bashrc file. Recently I told to use the /etc/environment file. Well, both work fine. So, what is the difference between them? I ...
9
votes
2answers
896 views

Desktop Files don't use seem to use $PATH correctly

I am creating .desktop files for use in the Unity Launcher. I have my own location in my home directory where I put my executables (~/usr/bin/) which is correctly added to my PATH environment ...
9
votes
1answer
9k views

How to reload variables from /etc/environment without re-logging in?

How to reload variables from /etc/environment without re-logging in? source /etc/environment in bash works for program run through terminal, but running programs through shortcuts at GUI does not ...
7
votes
2answers
568 views

What is the difference between `VAR=…` and `export VAR=…`?

What is the difference in doing $ MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=384m" to doing $ export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=384m" and is there any side-effect of doing either in an SSH ...
6
votes
2answers
2k views

Where can I find documentation on the /etc/environment file format?

From System-wide environment variables: /etc/environment - This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of ...
5
votes
4answers
26k views

How to set environmental variable PATH?

I'm using Ubuntu 10.10 and downloaded jdk7 from java.sun.com. That jdk is a compressed file and on extraction there I got all the files and folders of jdk1.7.0. But now if I tries to compile a java ...
2
votes
1answer
1k views

~/.pam_environment doesn't work since Ubuntu 13.04 [duplicate]

I have this line in my ~/.pam_environment: PATH DEFAULT=${HOME}/bin:${HOME}/.local/bin:${PATH} and it worked perfectly well on Ubuntu 12.10, but since I've updated to 13.04 it is ...
0
votes
2answers
6k views

Ubuntu adding path/Environment variables

I am trying to install apache maven 3 in Ubuntu 12.04 lts. What I did was open the terminal then I typed the following commands export M2_HOME=/usr/local/apache-maven/apache-maven-3.0.5 [Then ...
7
votes
3answers
14k views

What is $DISPLAY environment variable

I am new to shell script NOT able to understand what is $DISPLAY environment variable. I am running Ubuntu 13.10 and using /bin/bash shell. I have connected two monitors. Questions: echo $DISPLAY ...
4
votes
1answer
800 views

Getting Full User Name

How do I look up my full user name in Ubuntu? I want this information to propagate to the environment variables GIT_AUTHOR_NAME and GIT_COMMITTER_EMAIL.
4
votes
1answer
8k views

libxml2.so.2 No version information available

I repeatedly get the following error when using GRASS GIS and I think a few other programs: /usr/local/lib/libxml2.so.2: no version information available ... As far as I can tell I have libxml2 ...