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

learn more… | top users | synonyms (1)

0
votes
0answers
12 views

Environment Variable not Exporting [duplicate]

I have this script that I'm writing, basically as my own free dynamic dns system (with a bit more manual-ness at the moment). Here it is: #!/bin/bash ...
2
votes
2answers
206 views

Setting environment variables with .bash_profile: only last export works properly

I am trying to export some environment variables in Unix using .bash_profile It reads now like this: export PATH=${PATH}:/usr/local/cuda-6.0/bin/ export ...
0
votes
1answer
16 views

Pass environment variables to clean chroot in Arch

I am writing a PKGBUILD for Arch Linux. The package is large and compressing/uncompromising it take considerable time for limited space savings and I would like to turn it off while I am writing the ...
0
votes
0answers
27 views

How do I send a variable through SSH so it can be used across servers? C Shell

EDIT: Would this be possible in bash? Note: I have to use C shell. (.csh) I have something very similar to the following code: set var = "string" ssh -X server "$var" << END * I ...
0
votes
4answers
17 views

Unable to add folder to PATH in .profile file

The following is my .profile file: # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see ...
4
votes
3answers
245 views

how to prevent exported environment variables to be recognized/accessible by a child shell (bash)?

So, I need to prevent loads of exported variables to be recognized by a child shell. The problem is an application (Wine+UDK) wont build projects with too many (>65535) bytes on the environment, ...
1
vote
1answer
157 views

Set Environment Variable for Ranger File Manager

I've recently stumbled across ranger file manager and immediately took a liking to it. However, there is still a problem I couldn't figure out the solution to: How is it possible to change environment ...
1
vote
3answers
1k views

How to set Ruby GEM_HOME and GEM_PATH

I'm a NOVICE user of Linux and using Linux mint 17.1 I've reinstalled Linux mint 20 time in last 3 days for that issue but could not fix it I'm trying to install ruby on rails using rvm what ...
3
votes
1answer
599 views

Inherit environment variables in systemd Docker container

I have a Docker container running systemd. I want to pass environment variables to applications under it. When I start systemd from within Docker (/sbin/init as command line), Docker exposes ...
4
votes
2answers
75 views

Where is the `$TERM` environmental variable set in Debian Jessie for console logins?

I have read a lot of articles and SE questions regarding how and where the default $TERM environmental variable gets set. Unfortunately in Debian 8.1 I can't seem to find where the default $TERM ...
0
votes
2answers
29 views

How to pass an environment variable when change rooting?

I don't seem to be able to pass an environment variable to a chroot: $ sudo apt-get install debootstrap dchroot $ sudo debootstrap trusty mychroot $ sudo chroot mychroot /bin/bash -c "MY_VAR=5; echo ...
2
votes
1answer
105 views

Why does bash parameter expansion not work inside systemd service files?

I am trying to use systemd's EnvironmentFile and add an option to the command when it is set in the file. I have the following in the unit file: ExecStart=/usr/bin/bash -c "echo ${PORT:+port is ...
0
votes
1answer
784 views

Installing netbeans on Scientific Linux- NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread “main”

I'm installing netbeans 8.0.1 on Scientific Linux. I have executed the installer .sh but I get the error: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main" ...
6
votes
1answer
63 views

Bash: How to avoid variable name substitution when using auto-completion?

I'd like Bash to stop removing variable names from paths and replacing them by their values. I tried several 'shopts' settings in various bash versions but was not successful in keeping a variable ...
10
votes
2answers
10k views

How to reset a shell environment?

This issue has been bugging me for a while, and although I've thought I've found my answer through EnvWatcher, unfortunately it only works on Bash. And I use zsh. I would like to replicate the things ...
0
votes
1answer
68 views

Bash - check environment variables

The env command can be used to print environment variables in bash. I want to ask if there is any built-in command to do this ? $ export temp="hello world" $ env | grep temp The second command ...
2
votes
1answer
63 views

Bash - shell vs environment variable [duplicate]

I want to clarify a confusion I am having in shell variable vs environment variable. I did the following test, where I have a shell variable abc and export it to an environment variable. $ $ ...
-1
votes
1answer
37 views

How can I delay the evaluation of variables (lazy evaluation)?

For example, I create 32768 directories named 0,1,2,...32767. I want to randomly choose one as the path every time I run a command. So I change $PATH to $PATH:/blabla/$RANDOM, but it won't work ...
1
vote
1answer
31 views

How set environment variable permanently in Red Hat Linux?

As I'm using Red Hat Linux 5.3, I'm unable to set environment variable permanently. I want the file names for csh, from which I can add the environment variables permanently.
7
votes
1answer
589 views

Bash: How many nested sessions deep?

Say I start a bash shell, ...and then another bash session from within that shell, ...and then another bash session from within that session, ...and then another bash session from within that session, ...
2
votes
1answer
23 views

how to set Internal Variables in mailx in linux?

save internal variable enable saving of messages in the dead.letter file on interrupt or delivery error.The default is save. problem: default is save so dead.letter file is created at home directory, ...
77
votes
2answers
8k views

VISUAL vs EDITOR what's the difference?

I generally set both VISUAL and EDITOR environment variables to the same thing, but what's the difference? Why would I set them differently? When developing apps, why should I choose to look at VISUAL ...
43
votes
4answers
2k views

Is there ever a good reason to run sudo su?

To launch a root shell on machines where the root account is disabled, you can run one of: sudo -i : run an interactive login shell (reads /root/.bashrc and /root/.profile) sudo -s : run a non-login ...
1
vote
1answer
41 views

Get value of environment variable in for loop

I have several environment variable pam_branch app_branch worker_branch I use an array to define different projects and I want to get the values of these env var by rebuilding them in a for loop ...
0
votes
1answer
604 views

How to specify a custom include directory in Debian?

I am trying to compile my program on a Debian system via ssh and without root privileges. PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" I ...
5
votes
2answers
2k views

How can I set env variables so that KDE recognizes them?

I need to set some environment variables such as the XDG spec ones, before KDE starts in such a way that kwin and any apps run from KDE will inherit them. Where could I do this, and how?
0
votes
1answer
33 views

What is the perfect combination of Environment Variables for Tomcat? [closed]

I hosted one application UI in apache-tomcat server. I had set environment variables in bin/setenv.sh file as: CATALINA_OPTS="-server -Xms256m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=1024m ...
2
votes
1answer
100 views

Finding out what sh is [duplicate]

I am writing a set of scripts that I want to be portable, but I need to know whether sh on the current platform stands for bash, ksh, or ash. Is there a clear way to do it? What comes to my mind ...
1
vote
2answers
25k views

“not a valid identifier” when I do “export $PATH”

When I run export $PATH in bash, I get the error not a valid identifier. Why?
0
votes
1answer
235 views

Set Environment variable $PATH globally on Ubuntu 14.04

I am trying to add evironment path variable of composer globally. I've tried many ways but doesnot seem to work. Searched other posts but did not find matching answers. I am trying to work out ...
0
votes
1answer
35 views

When I execute a .run file as <user> it works fine. If I sudo run it, it cannot detect Java

I am trying to execute a .run file that will install some applications. I'm installing the application in /opt/... When I run it without sudo, the installer runs correctly but cannot write to /opt/. ...
1
vote
6answers
95 views

How can I pass an environment variable to a script?

Okay, I can display an environmental variable from the commandline: echo $COLUMNS And get a response. But I can't execute that from within a shell script, I get nothing. So, there must be a way to ...
2
votes
1answer
73 views

Updating environment variable in a shell script

I am trying to update the value of an environment variable in a third party shell script. My OS is Oracle Linux Server release 6.4 (Red Hat Enterprise Linux Server release 6.4 (Santiago). I already ...
0
votes
0answers
98 views

glxinfo does not see environmental variables?

I am running following 32 bit command on 64 bit system: LIBGL_DEBUG=verbose glxinfo32 -v -t | head -5 It's output says direct rendering: No (If you want to find out why, try setting ...
1
vote
1answer
71 views

Configure tmux to use zsh

Right now I have my iTerm session configured to use zsh (/usr/local/bin/zsh), but I'm trying to configure tmux to use zsh as well, instead of /bin/bash/, which it's currently defaulting to. So far ...
5
votes
2answers
8k views

“No protocol specified” when running vim with sudo

Recently I start to get "No protocol specified" when using sudo vim. It's just a warning I guess, because everything was working normally (I can open, edit and save files). The message doesn't appear ...
3
votes
2answers
395 views

Where do EDITOR, PAGER, BROWSER environment variables come from?

When I look in man bash none of these are defined. However, random posts online refer to them; where do they come from? Or are they just a convention?
0
votes
1answer
18 views

OracleSolaris 11.2 - setting MANPATH variable

What is the right way to extend MANPATH in Solaris? Currently it is empty for a user session, so I get to do it manually in $HOME/.bash_profile: ...
3
votes
3answers
60 views

What's the 'right' format for the HTTP_PROXY environment variable? Caps or no caps?

I've encountered both http_proxy and HTTP_PROXY. Are both forms equivalent? Does one of them take precedence over the other?
1
vote
1answer
31 views

How to switch java environment for specific process?

I use openjdk in my work, but sometimes I need oracle's jre or even specific version of oracle's jre. As I know, I should update JAVA_HOME value and /usr/bin/java or /etc/alternatives/java link ...
5
votes
4answers
1k views

How can I make shell aliases available when shelling out from Vim?

In my .zshrc, I declare some aliases. Eg, which dbstart shows the contents of that alias. If I open vim from that shell, it is a child process. In Vim, I can run shell commands with :! some_command. ...
0
votes
1answer
48 views

How to change JAVA_HOME temprorary with env command

I use openjdk for my work, but sometimes I need oracle's JRE. I thought that I could use 'env' command for this, but can't figure out why it's not working. I have openjdk in ...
1
vote
1answer
50 views

How to append to an environment variable using an .env file?

Assuming the .env file is loaded before execution, how can you append to it without overriding it? DEBUG=True FOO=BAR PYTHONPATH="/Users/James/project/" The above file would (?) override it, and ...
1
vote
1answer
49 views

Magic environment variables in gnome-terminal

I had installed a proxy software (cntlm) on my machine. It sets the environment variable http_proxy to 127.0.0.1:3128. Now I've uninstalled the program using apt-get remove cntlm. However I'm able ...
0
votes
2answers
45 views

Does kali distro not use /etc/environments file?

I appended a path to /etc/environments file and now it is like so: mindaugas@Kali:~$ cat /etc/environment | tr ":" "\n" PATH="/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /sbin" I ...
1
vote
1answer
48 views

How do I add an installed program to my PATH so I can run it from the command line?

I installed jsx using npm: npm install -g jsx Now it installed jsx in this path: /node_modules/lib/node_modules/jsx/bin In the bin, I'm having jsx. Now if type ./jsx, it works fine as expected. ...
1
vote
4answers
93 views

Is there a CLI tool that would prettify a JSON string [closed]

On my host I enter the following, which returns a bunch of information which isn't particularly easy to read at the CLI. echo $ENV_VAR | base64 --decode Is there a way to format it? This is a ...
0
votes
1answer
170 views

Possible to pass env vars into chpst without envdir?

I use runit to daemonize my web application, and I'm trying to see if I can have my process managed by sv not have to have a corresponding envdir for its environment variables. I wonder if I can just ...
2
votes
1answer
33 views

Unset all ENV variables matching _PROXY

I'm trying to unset all environment variables that match _PROXY: env | grep -i _proxy | column -t -s '=' | awk '{ print $1 }' | grep -iv 'no_proxy' | xargs -0 -I variable unset variable but it's ...
2
votes
1answer
88 views

How to safely transmit a password over SSH for a remote command to use

On the local server, I have a program that stores the password in the predefined environment variable (SPECIAL_PASSWORD). On the remote server I have a program that reads and uses a password from a ...