Tagged Questions
7
votes
2answers
305 views
How can I create a clean shell environment for temporary use?
I am a frequent answerer on a Unix-focused popular Q&A site, and in many of my answers I provide examples using the bash shell. However, each time I do this I have to manually go through the ...
0
votes
2answers
538 views
$PATH in /etc/profile not inherited by user shell
I have this in /etc/profile in Fedora 17:
PATH=$PATH:"/usr/pgsql-9.2/bin"
EDITOR="/usr/bin/emacs -nw"
PSQL_EDITOR="/usr/bin/emacs"
PAGER="/usr/bin/less"
export PATH USER LOGNAME MAIL HOSTNAME ...
9
votes
1answer
229 views
How do you set up the environment for es?
I've been playing with es the last couple of days, and it (like rc) has the quirk/feature that it only runs its startup script (.esrc) on login. The usual way to run code in each interactive session ...
1
vote
2answers
4k views
How to set environment variable JAVA_HOME that will be saved on exit? [duplicate]
Possible Duplicate:
How do I set a user environment variable? (permanently, not session)
I use Suse. First was installed jdk7, so JAVA_HOME remains like:
/usr/java/jdk1.7.0_05/
After I ...
8
votes
2answers
2k views
What is the difference between ~/.profile, ~/.bashrc, ~/.bash_profile, ~/.gnomerc, /etc/bash_bashrc, /etc/screenrc …?
Answers to the questions on SO and askubuntu, along with poking through (and reading headers of) $HOME and /etc/, indicate a number of files that can be used to set environment variables, including:
...
0
votes
2answers
958 views
Trying to set JAVA_HOME in ~/.bashrc
I have added this line at the end of ~/.bashrc file.
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java
But when I do echo $JAVA_HOME I don't get anything as output, I expected ...
1
vote
2answers
625 views
How to make changes to /etc/profile take effect
I am trying to change $GRAILS_HOME from /usr/grails-1.3.7 to /usr/grails-2.0.0
If I just do export GRAILS_HOME=/usr/grails-2.0.0 it doesn't persist when I log out and back in.
I found a line in ...
0
votes
1answer
259 views
Variable assignment in .bash_profile has no effect
I added the following to my .bash_profile:
JAVA_HOME=$JAVA_HOME:/usr/java/jdk1.7.0
export JAVA_HOME
However, when I echo $JAVA_HOME it outputs an empty string. Why weren't my changes to ...
3
votes
5answers
1k views
ssh user@IP sh <command> missed environment variables
I use an approach
ssh user@IP sh [runme.sh]
to execute script remotely, this works fine. But I got one problem, that is in runme.sh, I can't get any envirnoment variables which are defined in ...
1
vote
4answers
251 views
linux shell global linux memory in mem variable - from shell
Is there any way for me to set an env variable without editing files to be in memory and effect other shells as well, which will take effect on any new user who connects that machine and will take ...
19
votes
4answers
1k views
Alternative to .bashrc
Is ~/.bashrc the only place where I can specify user specific ENV Variables, aliases, modifications to PATH variable, etc?
I ask because it seems that ~/.bashrc would be bash only...