-1
votes
1answer
36 views

Environment Variables and .bashrc [closed]

I need Help in this: that is how to do this Edit the setting file of the user. In our case it should be in the root directory of the user and the name is .bashrc or .bash_profile 2.- Add the ...
3
votes
1answer
224 views

Why are 'source' and '.' not always the same, when they're supposed to be identical?

I was under the impression that source was a synonym for . in bash. However, it seems that in the .profile file, source doesn't work. This youtube video demonstrates that when source is used in ...
1
vote
1answer
217 views

NDK_ROOT enviroment variable defined but script does not see it

In my ~/.bashrc i have this: export ANDROID_SDK=~/Devel/android_dev_x64/sdk export ANDROID_NDK=~/Devel/android-ndk-r9d export NDK_ROOT=$ANDROID_NDK export ...
1
vote
1answer
61 views

Call shell script “inline” in another shell script

So the bottom line here is that I am trying to have one go-to script work to set environment variables (let's call it setenv.sh) that will be used in subsequent scripts. In Windows (I know, that is a ...
2
votes
1answer
43 views

bashrc shortcuts in Tmux

I have sets many shortcuts in .bashrc profile of local user, and they work properly. Currently on my 12.04 system but when ever I tried to used them in tmux, I always get the same response command not ...
1
vote
1answer
105 views

setting PATH to /etc/profile or /etc/environment does not work with sudo

I want to launch Intellij IDEA IDE via sudo idea.sh. sudo because IDE needs to manupulate files from /etc/share. idea.sh is placed at /home/<username>/<path>/bin/idea.sh. I tried to add ...
0
votes
3answers
82 views

Strange autocompletion behavior

Well...I'm so confused, cause the only real problem in my case is freaking apostrophe ('). Situation: expanding PATH variable influence word completion, based on whether was apostrophes in additional ...
0
votes
1answer
163 views

export PATH doesn't work correctly

I have a problem with $PATH export. The only place I found where I modify $PATH is /etc/environment: ANDROID_HOME="/opt/ADT/adt-bundle-linux-x86_64-20130522/sdk" ...
0
votes
1answer
96 views

Why environment variable disappears after terminal reopen? [duplicate]

I've tryed to add environment variable in terminal: loom@loom:~$ export DOOM=/home/loom/doom/ loom@loom:~$ echo $DOOM bash: /home/loom/doom/: Is a directory Then I've closed terminal and reopened ...
0
votes
2answers
111 views

Save enviroment PATH once I added one

I'm trying to add an environment path for android studio, and I've done the following steps: checking is there is already: echo $PATH add my path: export ...
0
votes
0answers
45 views

help changing an environmental variable

I need a little help with this syntax. Do I use the quotes? Do I add these variables to .bashrc or bash? Are bash and .bashrc the same file? Where is the .bashrc file? What is the "." leading the ...
0
votes
2answers
187 views

How to change environmental variable permanently?

I am trying to use third party packages in Python. To import all the modules I need to update PYTHONPATH. I read several blogs on it but still I have following questions unanswered. Is sys.path ...
0
votes
0answers
77 views

PATH variable to Apache OPENNLP OK but doesn't work

yesterday I installed in my Ubuntu AWS 12.04 (Amazon) micro istance OpenNLP and seemed working. Today when digiting opennlp:command not found Following suggestions found here: I modified my ...
1
vote
2answers
52 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 ...
0
votes
0answers
69 views

application settings and environmental variables

I was perusing an article on environment variables on wikipedia: http://en.wikipedia.org/wiki/Environment_variable One of the environment variables is PATH and you can access this environment ...
1
vote
2answers
109 views

What happens if I manually change the USER environment variable

After running env in the terminal to check if some of my other variables were persistant across settings I noticed the USER=xxx environment variable. I've had to reinstall Ubuntu before after fooling ...
4
votes
2answers
160 views

Something wrong with my `.profile`

I recently installed a few softwares and needed to add their bin/ directories to my PATH. Nothing abnormal so far. But I decided to be smart about it, and rewrote a part of my .profile so I didn't ...
0
votes
1answer
98 views

Set command can't handle lines constituting of a \n (word/line counting script)

I have a problem with execution of a while loop, I have found out that the problem involves the execution of the set command, the assigment of the \n character to an environmental variable ...
1
vote
1answer
122 views

Ubuntu .pam_environment for non-login shell

I remember in the past, we have two place to set env variables for Ubuntu Login shell - ~/.profile Non login shell - ~/.bashrc But now according to the doc [1], they are not recommended anymore. ...
0
votes
0answers
18 views

adding directory to path environment variable doesn't remain in path [duplicate]

I have been trying to get a program called "passenger-memory-stats" to run as the super user. The program is installed in the following directory: /usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby . I ...
0
votes
0answers
17 views

Where to set environment variables for all users [duplicate]

Apologies in advance if this question is very simplistic! I have Ubuntu 12.04. I manually installed Maven by downloading the binary tarball file and extracting it to the /opt/ folder. I then set the ...
0
votes
0answers
154 views

Tab completing directories when exporting variables in bash 4.2

I will start by mentioning this is a different issue (but perhaps related) to the escaping of dollar signs when tab completing variables. What I am trying to do is this. When exporting a variable ...
0
votes
2answers
327 views

Where should I add/modify environment variables?

I would like to edit my .bash_profile file. However it appears that in Ubuntu (and perhaps other Debian distros) this is named as .profile. However I cannot seem to find the expected variables like ...
0
votes
2answers
118 views

How to set environemt variable without rebooting Ubuntu?

Problem: During Android development, in order to add ADB path to environment variable; I did following things in short- gedit /etc/environment - Added my desired path in the file such as ...
0
votes
2answers
502 views

PATH-variable gets always reset. How to fix that?

A little time ago, I found out, that I can create custom commandterminals with expanding the PATH-variable. Unfortunately, it gets always resettet, when I close the terminal and opens it again. Do ...
1
vote
0answers
163 views

javac cannot found, even after adding non-standart path to it in $PATH

Ubuntu 12.10, 32bit Problem too damn simple: I have a NTFS partition and unpacked from .tar.gz jdk on it. All I need from bash, is to see javac compiler, that is located in directory ...
0
votes
2answers
1k 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 ...
0
votes
2answers
359 views

How to Import a Variable from a Script?

I want to get a variable from another script, as demonstrated in http://stackoverflow.com/questions/5228345/bash-script-how-to-reference-a-file-for-variables However, the answer uses source command ...
2
votes
3answers
220 views

How to declare functions as variables

I want to declare variable with pwd() function, which will give me the current path. I want to use pwd() function as ${pwd} variable, something like that. How I must write? Thanks!
1
vote
3answers
662 views

Why won't environment variables added to .profile show up in screen

I'm running Ubuntu 12.04 I added export LD_LIBRARY_PATH=/home/dspies/workspace/hdf5-1.8.11-linux-shared/lib to .profile but when I log in and open terminal and put echo $LD_LIBRARY_PATH there's ...
0
votes
1answer
108 views

Environmental Variable for current domain

I'm using Ubuntu 12.04 LTS Desktop edition I want to use environmental variable for currently joined domain just like I use $USER to bring current user. From what I read there are few variables for ...
0
votes
2answers
3k views

/usr/bin/env: bash: Permission denied

Suddenly, when your Seniors Linux Server admin does not come at office. And Then Junior Linux Admin take a charge of it, then it is NIGHTMARE for them. Please help. I'm not able to recollect, that ...
3
votes
1answer
191 views

Can't get $(date +%F) set as environment variable

I would like to create an evironment variable that will output the current date. I have added the following to ~/.pam_environment: TODAY=$(date +%F) Apparently you have to log out after changing ...
19
votes
5answers
16k views

How to list all variables names and their current values?

Including not only $HOME, $PWD etc but any other you have defined.
0
votes
1answer
2k views

How do I set CLASSPATH variable for Tomcat in 12.10?

Previously, I have set the JAVA_HOME path using the terminal with the following command: export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-i386" >> ~/.bashrc Now, I want to set the CLASSPATH ...
5
votes
1answer
64 views

What is the difference that explains different results of different ways to assign values in a command-line?

What is the difference that explains the different results of these commands? a=2 echo $a set a=2 echo $a a=2; echo $a set a=2; echo $a
4
votes
2answers
2k views

How to pass results of bc to a variable

I'm writing a script and I would like to pass the results from bc into a variable. I've declared 2 variables (var1 and var2) and have given them values. In my script I want to pass the results from ...
2
votes
3answers
796 views

How to find out where $MANPATH is set?

How can I find out in which configuration file the environment variable $MANPATH is set? Is there a way to backtrace the values? I am aware of that I can grep through the whole file system using find ...
4
votes
2answers
70 views

How do you print/recall the definition of a function in bash

I can define and print the contents of variable called my_var like this: my_var="hello" echo $my_var but if I define: my_funct {echo "hello";} how can I recall my function's definition later on? ...
3
votes
3answers
2k views

Cannot use “./” to execute a shell script

Maybe someone here would be able to help me out. Have installed Ubuntu 12.04 LTS (kubuntu) on two machines. The .bashrc and .bash_profile files are identical as the file structures on each machine is ...
7
votes
2answers
1k 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, ...
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 ...
1
vote
2answers
331 views

How do I set and use shell variables?

IRSTLM=$HOME/irstlm I need help setting this variable up. Was wondering if this is correct syntax IRSTLM=/home/user/irstlm Is that possible to run from root? I need it to be done in root in order ...
8
votes
5answers
8k 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 ...
4
votes
1answer
398 views

Difference between launching an application from a keyboard shortcut vs the terminal?

What I have observed: When I type emacs in gnome-terminal, it launches in the same environment, with variables set in .bashrc. If I use a keyboard shortcut to the command emacs, it opens in an ...
7
votes
2answers
508 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 ...
36
votes
4answers
44k 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 ...
1
vote
1answer
860 views

symbolic link to /opt

How do you : "Create as administrator (sudo) one link in /usr/bin to the command that you'd like to call (for example with8.5 and tclsh8.5). One time that you had create the links you can run ...
1
vote
1answer
159 views

Unable to press 'E' key in bash when I add export EDITOR=vim in /etc/inputrc

When I add the line export EDITOR=vim into /etc/inputrc and start a new session in BASH, I am unable to press the E key on the keyboard. (Well, I can press it, physically, but nothing shows up in the ...
6
votes
2answers
7k 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 ...