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

learn more… | top users | synonyms (1)

0
votes
0answers
35 views

login loop after editing /etc/profile and /etc/login.defs

I am relatively new to Linux/Unix and I have a Debian Jessie 8 distribution installed in my laptop. I tried to install tex-live following the instructions in this link http://tex.stackexchange.com/...
3
votes
1answer
57 views

set environment variables from stdout

How can you do the equivalent of piping stdout to 'export'? For background, I have a non-shell script that generates environment variables like so: DATABASE_URL='someurl' MAIL_KEY='key' REDIS_URL='...
0
votes
0answers
10 views

What will be the result when USERGROUPS_ENAB is set to no in /etc/login.defs and no groupname is specified when using the commnd useradd

The default command when we add a user is: sudo adduser -m -g initial_group -G additional_group -s login_shell user_name In /etc/login.defs USERGROUPS_ENAB is set to yes by default This means ...
1
vote
1answer
15 views

Ranger file manager - Open gnome-terminal instead of xterm

I recently started using Ranger as my default file manager, and I'm really enjoying it. Right now, I've managed to change rifle.conf so that when I play audio or video from Ranger, mpv opens in a new ...
0
votes
1answer
53 views

/etc/environment: /root: Permission denied

Whenever I run apt install to install a package it fails. I get this output at the bottom. It seems to go fine until it asks for permission ([y/n]) then is immediately followed by this output, ...
0
votes
1answer
27 views

How to save an alias of an eval $(other_comand) command

I've been using docker for a while and there's a command I write each time I boot up my docker: eval $(docker-machine env) I know eval shouldn't be used unless necessary, but it's mentioned by the ...
2
votes
2answers
86 views

Use env with environment variables from file

Let's say I have a file (called e) with this content: a=3 b="5 6" How can I get each one to be interpreted as a separate argument to env? That is, to have it equivalent to: $ env a=3 b="5 6" ...
5
votes
1answer
45 views

Making environment variables available for downstream processes started within an init.d script

This questions stems from @FrustratedWithFormsDesigner comment. How do I make export environment variables set within an init.d script available to downstream processes started within that same init....
1
vote
2answers
26 views

bash : export: `PATH:home/pi/netkit/bin:/usr/local … invalid indentifier [duplicate]

Currently I'm struggling with some notification every time I open terminal: bash: export: `PATH:home/pi/netkit/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:bin:/usr/local/games/:/usr/...
1
vote
1answer
25 views

What is ${PYTHON_REL} FreeBSD

I have an error whilst making a port, so I checked the makefile, and found the problematic line. The issue is that I don't know how to fix it, as I don't know how to change the Python_Rel variable. ...
5
votes
3answers
488 views

Exclamation mark variable `$!`

I have been studying for my Unix exam and I often saw exclamation mark variable - $! If I write echo $! on my Mac shell tells me something like "You have mail in…" Is purpose of this to store whether ...
1
vote
1answer
21 views

saving path on Debian

I add this to the end of ~/.profile PATH=/usr/local/texlive/2015/bin/x86_64-linux:$PATH export PATH but it is never saved. Close the terminal, open it again and the path is without the one to latex....
1
vote
2answers
39 views

Setting path environment variable for desktop launchers [duplicate]

I set a custom $PATH in ~/.bashrc with PATH=$HOME/.bin:$PATH. When I launch the geany from the terminal it is able to find my custom build tools that are located in $HOME/.bin. When I launch Geany ...
2
votes
1answer
39 views

Can I use an environment variable to define an alias?

I'm using an automation engine to run perl scripts. script_X requires a wrapper script so it's run like: wrapper_script script_X --parameters But the automation engine can't understand that ...
1
vote
1answer
34 views

timestamping history file causing erroneous lines in history command

I have .bash_profile setup to export to a history file: export HISTFILE=/root/history/.bash_hist-$(who -m | awk '{print $1}') Then I am exporting time stamps for the history command. export ...
1
vote
1answer
43 views

export (save) and import (source) shell variables

I need to save environment variables to a file and (later) a process should import them. I need this to workaround a program fooprog that nullifies the environment before executing a barscript, and I ...
-1
votes
1answer
80 views

Where do C# executables running on an Ubuntu Linux 16.04 desktop which use source code that DLLImport's shared objects look for them at runtime? [closed]

Where do C# executables running on an Ubuntu Linux 16.04 Lenovo Thinkstation desktop which use source code that DLLImport's shared objects (so's) look for shared objects at runtime? Even if the shared ...
0
votes
1answer
36 views

Is using env and export the same thing?

I'm wondering whether this (From https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-a-linux-vps): env VAR1="blahblah" command_to_run ...
1
vote
0answers
28 views

no names in kali linux [closed]

I am running kali linux, which has gnome. I just updated with: apt-get update && apt-get upgrade that what happen apt-get update && apt-get upgrade
3
votes
2answers
58 views

How to export a variable from a perl script into a shell script?

I have a shell script in which I am running perl script by below code. perl perlscript.pl In the perl script I have defined a variable called $circle. Now I want to use this variable value in my ...
4
votes
2answers
362 views

SH: How to make vars from one script available in the main script?

I have two scripts that need to run and both require the same variables set the same way. As a result I figured I'd break the setting of the variables out into a separate script. However, I can't seem ...
4
votes
3answers
501 views

Is there a Unix equivalent of the Windows environment variable PATHEXT

I am wondering if there is a Unix equivalent for the Windows environment variable PATHEXT. For those with no Windows background: Adding a file suffix to PATHEXT allows me to execute a script without ...
1
vote
1answer
50 views

cannot get screen command to execute code containing DISPLAY=:0

I am trying to ssh into a remote machine and run a shell script, which opens a GUI. I want the GUI to open on the remote machine and remain open (so I am using DISPLAY=:0 nohup). I tried: ssh -t &...
1
vote
2answers
60 views

Why does environment variables persistance breaks the PATH var

I tried to persist the environment variables for ORACLE in RedHat using /etc/environment It cleared my PATH variable, no command was recognized afterwards. Why does it happen, since just ...
3
votes
1answer
33 views

How to temporarily change locale for sudo?

To change the locale of the current user like export LANG=en_US.UTF-8. But this environment variable doesn't affect the root user. When I use sudo the display language remains default. How can I ...
1
vote
2answers
47 views

What sets the $SHELL environment variable?

Where is the environment variable $SHELL first set on a UNIX system? How can I find and print all of this type of default settings of my terminal?
1
vote
1answer
33 views

Where are the places the PROMPT_COMMAND variable could be set?

I installed drush and as part of the installation it makes some changes to the PROMPT ... # Optional. Enrich the bash startup file with completion and aliases. drush init ... Whenever I execute an ...
2
votes
1answer
32 views

Exporting a variable so it appears in a script sourced through sudo

I have a bash script/s which has a "main" script which is run as sudo. Variables are declared in this script. Then it sources another commands.sh script, however this script uses sudo to drop back to ...
1
vote
1answer
31 views

Pass Environment Variable to Sudo AWS ec2 sudo node

I am new to linux and AWS. I have a node.js server running on an EC2 instance. I am running the following command to keep it running endlessly and on port 80: $ sudo node app.js & Now when I ...
0
votes
2answers
75 views

How to properly set environment variables in Debian Jessie?

I can't figure out how to set environment variables properly, even though I tried to follow https://wiki.debian.org/EnvironmentVariables. I've added this to ~/.bashrc: if [ -f ~/.bash_profile ]; ...
3
votes
1answer
61 views

Can't export environment variables on X session start

My setup is: Debian testing (stretch), up to date LightDM with autologin enabled Awesome window manager bash, in ROXTerm or XTerm I don't seem to be able to set own environment variables and get ...
0
votes
1answer
45 views

“export VAR=thing && someCommand” reports “export: `&&': not a valid identifier”

I'm trying to set an environment variable and execute a command in a single line, like this: export PUB_CACHE=/app/src/.pub-cache && dart-sdk/bin/dart server.dart (Don't ask why... it's ...
0
votes
2answers
51 views

Get the latest value of an environment variable is a bash shell script

I wonder how can we get the latest value of an environment variable in a bash shell script. Problem I am having is, I have a environment variable which can be changed externally multiple times. But ...
0
votes
0answers
22 views

How to make cron job which suspends computer before specified time of the day

I am trying to make script which suspends computer if it is used before specified time of the day or if it is used too long. #! /bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/...
0
votes
2answers
11 views

How can i get an overview about env (environment variables) of all users on a system?

How can i get an overview about env (environment) of all users on a system? Status: i've got over 600 user in passwd, but each of them could have a env variable for a specifec project path (~10 ...
0
votes
2answers
53 views

Systemd bash builtins

I have an application that needs to use the commando source for setting his environment file. [Unit] Description=Programname After=syslog.target network.target [Service] User=root ExecStartPre=...
0
votes
0answers
37 views

Environment Modules: installing software

I understand how Environment Modules work, having used them before. I have read the various help pages, and I understand how to write a module file. My question is explicitly about the various ...
0
votes
1answer
33 views

Using export USER=myName doesn't change the output of whoami

I saw this example $ whoami MatsP $ g++ -Wall -std=c++0x getenv.cpp $ ./a.out MatsP $ export USER=DonaldDuck $ ./a.out DonaldDuck but for me it doesn't work. I am in a Debian machine. I used ...
1
vote
2answers
112 views

An environment variable with equal sign and && operator

I want to create an environment variable for this command: git --git-dir= echo test-folder/.git/ add Steps-to-follow.txt && git --git-dir= echo test-folder/.git/ commit This is a relevant ...
1
vote
1answer
41 views

how to get or reflect the name of the bash function which is called? [duplicate]

i did not yet found a solution to this. Anyone a hint? i sometimes write bash functions in my shell scripts and i love to have my scripts being verbose, not just for debugging. so sometimes i would ...
0
votes
1answer
37 views

Substitute variable in value of chpst loaded environment variable

If I use chpst to load environment variables like: env BAR=baz chpst -e envdir mycommand and in envdir I have a file envdir/FOO with contents foo$BAR is there a way so that for mycommand the ...
2
votes
2answers
64 views

Updating shell functions and aliases through environment variables

Say we define the following shell function and alias in .zshenv: export VARIABLE_A='original' function my_function() { print $VARIABLE_A } export VARIABLE_B='original' alias my_alias="print $...
0
votes
1answer
55 views

How to set multiple env variables from stdout pipe

I have a bunch of piped shell commands that give some env output. I want to set these as env variables for an additional command to add to the chain Kevins-MBP:ops kevzettler$ eb printenv | tail -n +...
1
vote
1answer
28 views

Which shells have functions where “local” does not alter exported variables for child processes?

In the example below, an exported variable is re-set as local in a function. Bash, Zsh, Fish don't pass on the original value to the child process. Are there any shells that make local affect the ...
2
votes
3answers
132 views

Bash one-liner to temporarily append path for chained commands without additional bash invocation?

Consider this: $ cd /tmp $ echo "echo YES" >> prog/myprog $ chmod +x prog/myprog $ prog/myprog YES $ myprog myprog: command not found I can temporarily modify PATH to call myprog by name like ...
0
votes
1answer
51 views

.zshenv not sourced on ssh login?

According to the docs .zshenv is sourced on all invocations of the shell, unless the -f option is set. It should contain commands to set the command search path, plus other important environment ...
1
vote
2answers
74 views

Why some commands don't load user environment when executed with ssh? (while other do)

On a target machine (OS X El Capitan) I have brew in /usr/local/bin. When I try to get brew's path I get no result: # ssh vagrant@127.0.0.1 -p 2222 which brew # Troubleshooting: brew is in /usr/...
1
vote
1answer
26 views

How can I set kerberos principal in environment automatically on the remote host?

I use both legacy krsh and ssh to login to a variety of boxes for root administration, as do several colleagues of mine. We all keep different history files by use of a variable calculated by running ...
1
vote
1answer
71 views

What is the LESS environment variable to man and how is it set up?

What is the LESS environment variable used for in man? I found that it could make the output of man jump to a match to the pattern stored in LESS. What about when there are several matches? How is ...