2
votes
1answer
36 views

Bash: Need to export variables to parent process. Is the parent the same process?

I'd like to launch a script that sets and/or updates some environment variables. Unlike this question, I don't mind launching the script as . /path/to/my/script/myScript.sh to force the script to ...
2
votes
3answers
460 views

How to delete a file from the file system in Linux when I don't have permission?

I re-installed ns2, but didn't delete a file from the filesystem with path: /usr/bin/ns So when I type on my terminal: which ns I get: /usr/bin/ns Instead of the path I have set which is: ...
0
votes
1answer
12 views

Should I make `emacs` a symlink or environment variable?

When I apt-get install emacs I can just type emacs and it launches. But I decided to replace the apt repository version (23 currently) with the latest stable release (24.3). Now, I'd still like to ...
0
votes
1answer
24 views

Set ENV variable for all commands in current directory in mac os

Is there a way to run all commands in current directory with some ENV variables predefined? Example of what I need: I put some file, say .env in my directory, with: export SECRET='abcd123' Then I ...
0
votes
0answers
43 views

Correct way of setting Ruby2.1 as the go-to application when it referenced to/called via shell?

I have installed Ruby 2.1 on my headless Debian server (7.4) by downloading the source from https://www.ruby-lang.org/en/downloads/ and then running the routine of ./configure make make install ...
2
votes
2answers
61 views

env -i zsh | How is this magic possible?

I'm currently working, for school, on a home-made shell, therefore I'm kind of curious nowadays about how shell vars are set. Yes, this can be really exciting ! Anyway, we obviously have to deal with ...
0
votes
0answers
29 views

Ubuntu: `env -i bash --norc`, but include essential variables such as HOME, DISPLAY? (where are these set?)

Is there an easy way to isolate a session of bash so that only essential variables (HOME, USER, DISPLAY, etc.) are preserved? (essential in that many programs fail if HOME, DISPLAY, TERM, SHELL, etc. ...
1
vote
0answers
23 views

ifs environment variable is not inherited

In Unix the IFS variable was often used to subvert system integrity. How it was fixed? The only answer I found is in wikipedia page http://en.wikipedia.org/wiki/Internal_field_separator which says: ...
0
votes
2answers
38 views

how to set up an environment variable that it stores a path along with another env variable but doesnt expands

I want to know how to set up an environment variable that stores other environment variable but these environment variables doesn't gets expanded when I echo instead if I use eval echo then it should ...
0
votes
1answer
136 views

Meaning of LC_IDENTIFICATION environment variable

Just out of curiosity, what is the meaning of LC_IDENTIFICATION? The reason I am asking is, that a fresh US-English installation of Linux Mint (I guess Ubuntu would be the same), located in ...
2
votes
2answers
205 views

Go-lang go tool works with Bash but not Fish

For those of you who have no idea what Fish is: http://fishshell.com/ Similarly, if you are not familiar with a Go coding environment and still wish to try and figure out this small puzzle, here is ...
0
votes
0answers
32 views

Removal of old version of java and install new java version

I have removed the older version of java installed (JDK 1.5) and have installed java 7. Now It shows both JDK versions in $PATH. I want to remove all installed java files and want to install new java ...
0
votes
3answers
452 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 [email protected] "cat /var/log/syncer/rm_filesystem.log | while read path; do stat -c \"%Y %n\" "$path" >> ...
0
votes
0answers
171 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
120 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
44 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
107 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 ...
8
votes
4answers
1k 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 ...
1
vote
2answers
160 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
0answers
123 views

How to a sudo command which keeps all environment variables

Example command is as follows, run as a normal user which python /home/me/env/development/python because the PATH environment contains a path that points out to this instance of python (instead to ...
0
votes
1answer
40 views

Why does 'which' give incorrect result?

I am executing on a Ubuntu 12.04 shell the following command: sudo bash -c "echo $PATH; which python" which displays something like ...
1
vote
2answers
691 views

Spaces in Linux environmental variables?

Given directory: /media/foo/can haz/bar, I have tried editing bash.rc with: export Foo=/media/foo/can haz/bar export Foo=/media/foo/can\ haz/bar export Foo='/media/foo/can haz/bar' export ...
0
votes
2answers
300 views

bash: variable name not being expanded with Tab completion

On a remote computer with bash version "3.2.51(1)-release" (OS: SUSE Linux Enterprise Server 11.1 (x86_64)), I could not do a usual tab completion with variable name. for example, I'd like to type: ...
2
votes
2answers
886 views

How to run a symlink pointing to an executable in terminal (Linux)

I installed NodeJs on an Ubuntu machine, and the package have been installed as nodejs. Now, to run it as node, I created a symlink: sudo ln -s /usr/bin/nodejs /usr/bin/node This will work if I ...
5
votes
1answer
1k views

Suppressing the “Picked up _JAVA_OPTIONS” message

I'm using _JAVA_OPTIONS to set some defaults for Java on RHEL. It works fine but now every time I start java I get the following message Picked up _JAVA_OPTIONS: -foo -bar -baz is it possible to ...
2
votes
2answers
122 views

Unable to get profile variable using ssh

Unable to retrieve the profile variable using ssh. server2 ==> user apptst ==> bash profile has $APPHOME variable. Was trying to retrieve the value from server1 using ssh but failed. Used options ...
0
votes
2answers
311 views

Root set environment variables

I have a small bash script which downloads a critical file, opens an SFPT connection, puts the file and closes the connection. As you can imagine, my script has some username and password information ...
4
votes
4answers
2k views

What is the Unix PATH variable and how do I add to it?

Many programming tutorials ask users to add something to their PATH but don't explain what it is. The existing resources that explain the PATH to users new to the command line are not very good. ...
1
vote
1answer
219 views

How to save environment variable on my Ubuntu Linux system

I am using Maven to the build process of my Java project. To launch the mvn command in any position within the shell I am using the following command to declare the environment variable in this way: ...
2
votes
2answers
1k views

sudo, runuser, su don't work as I expect when run as root with command as “echo $HOME”

When I run these commands it outputs as shown. /root sudo -u someuser -i "echo $HOME" /root runuser -l someuser -c "echo $HOME" /root su - someuser -c "echo $HOME" /root What i expected was ...
0
votes
1answer
450 views

In linux, how can we change bash environment variables using initialize script?

We know that we can change bash's environment variables, for example PATH, using initialize script, for example .bashrc. Just writing PATH=<VALUE> and you will get what you want. But, consider ...
1
vote
1answer
245 views

Can I change local environment variables for a running process?

Suppose I have a continuous process running that reads an environment variable: export APPLE=abc123 watch echo \$APPLE Now, is there any way to change the value that's being read during execution? ...
0
votes
1answer
63 views

How to set env variable for all process?

I'm working on Linux, Can anybody please help me to set a env variable on Linux that will be available for all process running on the same machine?
2
votes
1answer
333 views

Can't save PATH or JAVA_HOME variables, Oracle Linux 6

I am on Oracle Linux 6 and I am trying to add the path: /root/jrockit-jdk1.6.0_33-R28.2.4-4.1.0 to the PATH and JAVA_HOME variables. So, I login as root and I try: export ...
0
votes
1answer
467 views

Environment Variables and Shell Rc File [duplicate]

Possible Duplicate: What are PATH and other environment variables, and how can I set or use them? I am trying to automatically establish a connection with Amazon s3 using keys. This ...
2
votes
2answers
4k views

LANG and LANGUAGE environment variable in Debian based systems

It seems both the LANG and LANGUAGE environment variable are used by some programs to determine their user interface language. What are the exact semantics of these variables and where can I read ...
2
votes
2answers
2k views

How can I find out where an environment variable (like PATH) was set?

I have a xterm with the bash shell in linux. When I echo $PATH, it is showing a directory and I want to know who put this directory in the PATH. How can I find out? Thanks!
1
vote
1answer
72 views

Gentoo Linux global environments for root

I'm confused with setting variables in /etc/env.d directory. When I write "echo $PATH" from user - it's print me all variables that set it myself. But from root I see one... Where should I set ...
0
votes
1answer
98 views

What environment does an application run in if started via desktop shortcut?

I have noticed that the environment variables I export in my .profile or .bashrc files are not available to applications started via a desktop shortcut. At least to my IDE. They are available if I ...
0
votes
2answers
1k views

how do I add global Environment Variables in Gentoo?

I know they get read from /etc/env.d/ but I tried adding in my own file in there (00example) with a single env variable but they aren't picked up after either env-update. How does a user declare them ...
1
vote
2answers
829 views

Set environment variables for non-interactive ssh

Where is the most appropriate place to set environment variables for all (including non-interactive) ssh sessions, and for all users (including root)? I believe that it may be in a script under ...
0
votes
2answers
81 views

Is there a cursor-based interface to change environment variables?

I often need to change a small part of long environment variable (especially, e.g., paths), and do it either by pasting the thing into an editor and changing it there, or the equivalent. Is there ...
3
votes
3answers
2k views

LANG=C is in a number of the /etc/init.d/* scripts. What does LANG=C do and why do you need to set LANG=C.

Its not clear what it does or what it contains. I tried greping the out put of set and env to see what C or LANG are set to in other places on the systems. Nothing was clear about how it is used or ...
2
votes
2answers
5k views

Setting environment variables permanently under GNU-Linux systems

I was using the command export, but it looks that after some time the set variables disappears. What is the easiest way of setting an environment variable forever? Thanks
2
votes
1answer
170 views

Shell environment variables

I'm trying to add a directory to my PATH environment so I can run some commands remotely. I have set this in my .bashrc, .tcshrc as well as in /etc/profile and /etc/csh.login but whenever I check my ...
0
votes
1answer
2k views

changing /etc/profile does nothing to root PATH

rhel 5 root has /bin/bash for shell. I removed pathmunge /usr/local/sbin from /etc/profile. There is no /usr/local/sbin in /etc/profile.d/* /etc/bashrc /root/.bashrc /root/.bash_profile /root/.profile ...
5
votes
1answer
7k views

How to save environment variable from Terminal?

I am trying to save the PATH environment variable from the Terminal running on a Ubuntu system. I typed in the following however it does not get saved. export ...
3
votes
1answer
379 views

Linux: disable man from showing mans in non-English languages

On my Linux there are some outdated translated mans installed. I want to prohibit man utility from showing them. I want to do this permanently, while saving a current locale. What environment ...
1
vote
1answer
225 views

Which linux environment varaiable gives the path to the users desktop?

It turns out that different languages can have a path to the desktop folder. ~/Desktop is ~/Työpöytä in Finnish What way via the shell can I get access to the translated folder?
2
votes
5answers
3k views

When someone says “in your path,” what does this mean exactly?

New at programming here. I couldn't find this when I searched google and SO, but I was wondering what programmers mean when they say "put X in your path." Is this the usr/bin? Any other resources I ...