Questions tagged [environment-variables]

Environment variables are system-wide variables which share the same value. These variables are often parsed by the shell when executing commands, and are expanded into their appropriate variable. For example, this allows users to move file locations without needing to update hard-coded paths in scripts (they just have to update the environment variable).

Filter by
Sorted by
Tagged with
2 votes
1 answer
21 views

how to move ssh-key related files to another directory?

i've been trying to clean up my root directory so that it isn't clustered with random dotfiles. nonetheless, on setting up the ssh-key i came to a dead-end, where i wouldn't find a way to migrate ...
Lanny's user avatar
  • 21
-1 votes
1 answer
39 views

Set Variable to ls command output

I'd like to create a variable from the output of a bash command. How does one create a variable out of the output of the command "ls /Users". Variable creation does not work in this case: ...
Sam's user avatar
  • 11
3 votes
1 answer
175 views

What is this variable "RlsSvcPort" in my System environment variable?

I was checking my environment variables to make some dev-related changes and found this: What can it be?
Am33d's user avatar
  • 33
1 vote
1 answer
50 views

Bash terminals launched from windows UI have an invalid `!::=::\` variable set

When I run printenv one of the returned variables is !::=::\. I noticed that the variable exists because docker does not work correctly with it set. $ printenv | grep :: !::=::\ $ docker stack deploy ...
anderio Moga's user avatar
0 votes
0 answers
30 views

Putting Short SHA in ENV in dockerfile, when built from Quay build trigger

I'd like to access the Short SHA (from latest GitHub commit) via an ENV variable inside my Dockerfile. But, my build is kicked off by a Quay build trigger, so it doesn't appear I can use an ARG. Is ...
Dan's user avatar
  • 101
1 vote
0 answers
35 views

What is the difference between different options for 'ls' colored output in zsh?

I want to display colored output for the 'ls' command in the terminal for my MAC but I do not understand the differences between some of the methods. On some articles and reddit posts I saw people ...
Ravi C's user avatar
  • 11
0 votes
2 answers
33 views

BATCH: Correctly interpret environment variables passed by user through set /p

I want to support variable comprehension from user input in my script. >set target=%programdata% >echo %target% Gives me: C:\ProgramData All well and good, however... >set /p target= >%...
Luke Faez's user avatar
0 votes
1 answer
31 views

Expand variable to alias and execute

I have an alias set in my .bash_aliases file to execute neovim. I can successfully use this alias from the command line however I cannot use this alias via a variable (ie the EDITOR variable - set in ....
ljden's user avatar
  • 103
0 votes
0 answers
34 views

I have an issue with printing paths from environment variables in windows 11

So I tried to install javabridge for a project that I have with Weka. By doing this I discovered that I can not print the paths from environment variables when I tried to create a CLASSPATH and ...
0 votes
0 answers
11 views

How can I access the edit environment variables window? [duplicate]

I can't seem to access the edit environment variable editor, I instead get the edit system variable editor when I click on edit. Looking at the other questions, I maybe deleted the original path when ...
Tyuskwo's user avatar
-2 votes
1 answer
39 views

Override System Environment Variables syntax in Windows

I know that the syntax for expanding system Environment Variables on Windows is %VAR%. I just wondered -out of curiosity- if there were a way to override this in any manner. So entering e.g. @var (or ....
dba's user avatar
  • 97
0 votes
1 answer
54 views

How can I set a file located in the Roaming Folder as an Environment Variable? [duplicate]

I have installed Jupyter on my Windows. The jupyter.exe command looks like stored in C:\Users\XXXX\AppData\Roaming\Python\Python310\Scripts. C:\Users\XXXX\AppData\Roaming\Python\Python310\Scripts>...
Jordy's user avatar
  • 101
2 votes
0 answers
63 views

Running android avdmanager with sudo

I am running avdmanager create avd from my python script that I start with sudo -E to make my script be able to do priveldged stuff. But for some reason avdmanager created AVD inside /root/.android/...
Euler-Maskerony's user avatar
0 votes
0 answers
16 views

Docker nginx image optional tls option

I need to create a nginx docker image, which can be used to configure optional TLS/SSL certificates. When no certificate is provided, nginx should work as reverse proxy on port 80 and do its job. If a ...
Marc's user avatar
  • 265
0 votes
1 answer
72 views

Powershell: Use a string as multiple args

I have a string variable in PowerShell, $t="foo bar" and it should be passed as argument to command 'start-process'. My 'start-process' needs multiple args which is "foo" and "...
Dee's user avatar
  • 621
0 votes
0 answers
13 views

How to trace back PATH of executable in Windows? [duplicate]

In Windows, you can set PATH to specify which executables you can invoke without the need to specify their path. How can you trace back where Windows found the executable? Example 1: Let's say you ...
Matt's user avatar
  • 354
0 votes
0 answers
21 views

How to find RDFLib installation on Windows and add it to the path (Environment Variables)

I am using Anaconda on windows. I have installed RDFLib through Jupyter Notebooks. My programs using RDFLib work without problems. I downloaded my program on Jupyter Notebook as myfile.py file, and I ...
Karl 17302's user avatar
0 votes
0 answers
46 views

do i need to have [%systemroot%\system32] also when [%systemroot%] already is present in path?

Is there a need to also have [%systemroot%*system32*] or is that path already "covered" by [%systemroot%] ?
TiVoLi's user avatar
  • 1
0 votes
2 answers
325 views

How do I pass an argument from Windows Batch to single Powershell Command?

I know I can pass variables to a powershell script like this: powershell -file ".\filetorun.ps1" "arg1" "arg2" and put param(var1=args[0],var2=args[1]) in the Powershell ...
HTWingNut's user avatar
  • 451
1 vote
1 answer
39 views

Can't edit environment variables on Win 10 Pro from start menu - apps won't launch - java no longer correct version

Little lost on what happened here. Having an issue with Windows overall at the moment, pretty sure an upgrade happened (though not confirmed) and it's after doing something to the machine. I started ...
Dexter Whelan's user avatar
0 votes
0 answers
339 views

Trying to add environment variables to zshrc but permission denied

So, I am new to mac I trying to add environment variables to the zshrc file using echo "export VARIABLE_NAME=VALUE">>~/.zshrc But I am getting the error zshrc: read only file system: /....
weird_captain's user avatar
1 vote
1 answer
296 views

override windows store open action when launching python in powershell [duplicate]

C:\Users\my-username\AppData\Local\Programs\Python\Python311\python.exe is in my path but when I execute python in powershell it automatically opens up Microsoft Store which is anyway blocked by the ...
anjanesh's user avatar
  • 149
0 votes
1 answer
261 views

Using 7z command Windows 11

I have recently been trying to use 7z in Powershell but seem to be struggling to get it to work. I thought the issue would've just been that I didn't have 7-Zip added to my environment variables, but ...
CadenQ's user avatar
  • 1
1 vote
2 answers
242 views

Linux Mint $PATH, environment global change

I'm using the latest Mint (21.1, 64bit AMD). Apologies, this is probably more of a Stupor-user question than a Superuser one, but with much web-based searching I have come up with a plethora of ...
Birdman's user avatar
  • 39
0 votes
1 answer
250 views

How to start tmux session that overrides environment variables set in .bash_profile?

Suppose I have an environment variable set inside .bash_profile: export ABC=from_bash_profile. $ echo $ABC from_bash_profile When I try to create a new tmux session with environment variables for ...
m01010011's user avatar
  • 151
0 votes
1 answer
141 views

Find proxyaddress:port in Windows

I try to set the proxy when I work in companies so use git; pip freely. Currently I know that I need to set the proxy because when I try to pip install a certain library I get the old message : ...
minattosama's user avatar
0 votes
0 answers
139 views

List of system variables not showing (Windows 10)

When I go to "Edit the system environment variables" -> "Environment Variables" and then click on "Path" and "Edit" after, it doesn't show me the full list ...
Oughie's user avatar
  • 1
4 votes
1 answer
147 views

Where is the Windows PowerShell 'env:' directory located?

In PowerShell, I can type the following command cd env: and the pwd becomes: Env:\. I was wondering where this environment variable is in Windows 11. I looked under Control Panel > Environment ...
Dr_Xunil's user avatar
  • 326
1 vote
3 answers
243 views

Is there a way to set environment variables for explorer.exe that aren't there when windows is restarted?

Is there a way to set environment variables for explorer.exe that aren't there when windows is restarted? I was looking at some of the comments View process environment variables in Windows and they ...
barlop's user avatar
  • 23.2k
0 votes
0 answers
83 views

How do environment variables work for a login shell?

I am writing my own shell and I have a bit of confusion about environment variables. If you start any process logged into the user, it will have access to a few “standard environment variables” such ...
geodic's user avatar
  • 1
0 votes
0 answers
58 views

Extend system environment variables - Windows

In Windows 10, is it possible to combine/extend system environment variables with user environment variables? Similar to how path works? I've seen this answer on another question, but it only ...
Dan's user avatar
  • 253
0 votes
1 answer
250 views

Securing username and password passed as Environment variable

Username and Password are passed as plain text as environment variable while running a bash script from a existing process. using following command. sudo -u someuser USERNAME=abc PASSWORD=xyz /path/to/...
Saurabh Singh's user avatar
0 votes
0 answers
108 views

What determines whether or not the %HOME% environment variable is expanded?

I have two machines (both on an AD domain). On one Windows 10 PC, if I open a command prompt and echo the %HOME% environment variable, I get this result: C:\Users\johndoh>echo %home% C:\Users\...
watkipet's user avatar
  • 395
1 vote
0 answers
91 views

Environment Variable not showing up

I am implementing public private key based authentication and I need to parameters the location where I store my keys. So that, programmatically my jobs can read it from this location and establish ...
Srik's user avatar
  • 11
0 votes
0 answers
36 views

What happened to this added directory in environment variables path?

Added the following directory to the path by using this method: set path=%path%;D:\Programm\jflex-1.8.2\jflex-1.8.2\bin set path=%path%;D:\Programm\jflex-1.8.2\jflex-1.8.2\bin\jflex but, I can't find ...
3Dot's user avatar
  • 1
1 vote
1 answer
601 views

How to set a profile for Windows Terminal with user defined environemt variables

I would like to create a dedicated profile for Windows Terminal with the following: Update the PATH variable. Set some new environment variables. How can I achieve that?
GeorgeIrwin's user avatar
0 votes
2 answers
893 views

Jenkins build not reading or recognizing all of the environment variables with a Jenkins build in macOS

I have an issue reading or recognizing all of the environment variables with a Jenkins build. All of those necessary variables have been set via Terminal and are properly written in both .bashrc and ....
Mishovski's user avatar
0 votes
1 answer
50 views

Why do environment variables only expand to a certain level of nesting?

I found some confusing behavior in working with environment variables. If I have two environment variables and one points to another, when I reference the pointer variable, it will be automatically ...
Sidney's user avatar
  • 1,425
0 votes
0 answers
10 views

I have found that %path% variable expansion doesn't work for nested variables -- is this expected, and if so why? [duplicate]

So after installing sql, python, node and a bunch of other server like things on my dev machine I ran into an issue where my path variable had exceeded the max string limit; in order to handle that I ...
Sidney's user avatar
  • 1,425
1 vote
1 answer
83 views

Best way to detect that a ZSH scope runs inside a VScode's Terminal?

When I run build commands in Visual Studio Code I want to invoke my whole custom shell that I also use for macOS, thus I invoke; source ~/.zshrc && sync_all_shell_env There is a small problem ...
Fëanorson's user avatar
0 votes
2 answers
924 views

Setting environment variables in bash script doesn't work?

If I run this on the command line, it will make the commit be at the specified date: THE_TIME='2022-01-01T22:50:12 -0700' GIT_AUTHOR_DATE=$THE_TIME GIT_COMMITTER_DATE=$THE_TIME git commit -am 'commit' ...
Attribute's user avatar
0 votes
3 answers
336 views

How to run apps from Windows' command line like in Linux

Context: I use Fedora GNU/Linux as my main OS, but sometimes I need to work within Windows. Over the years, using Linux distros, I have become used to working mainly through the command line, calling ...
Noumeno's user avatar
  • 96
0 votes
0 answers
187 views

How to copy file of env variable to another file

I am executing bash commands inside a yaml file. I have set an env variable SECRET which point to a yaml file in my home directory, and I want to copy the content of this yaml file to another file, as ...
Khalil Mebarkia's user avatar
0 votes
0 answers
27 views

Deploy Group Policy for Folder Redirects via Windows Script on Windows Server

GP via Script Is there a possible way to Deploy a group policy for folder redirects instantly working on the local active directory domain via a script? The script should create a new GP and set the ...
Freddi's user avatar
  • 1
0 votes
1 answer
146 views

How to expand a variable containing another variable in a Windows Command Prompt window?

I have a variable x with the value "%USERPROFILE%\Downloads". In other words, the command set x produces the output shown below. x="%USERPROFILE%\Downloads" I then entered the ...
David Anderson's user avatar
1 vote
1 answer
468 views

Add a path to the Windows system Path via .bat

I would like to create a script to add a path to the Windows System Path variable. I searched a lot and found some possible solutions, but I'm afraid of making a mistake since I've heard reports that ...
Tyrone Hirt's user avatar
2 votes
0 answers
64 views

Can we make File Explorer accept PowerShell variables?

More and more, PowerShell is the de facto standard scripting language for Windows, and yet, in File Explorer, we are still stuck using DOS variables. e.g., you can type the following into the address ...
YorSubs's user avatar
  • 599
0 votes
1 answer
93 views

Is it possible to retrieve a shortcut location and use it as a variable in the target of itself?

I created a VBS script (C:\Script\ReadFolder.vbs) that accept a folder path as parameter. I would like to create a shortcut to run this script in different folders. First, I created a shortcut in &...
UnTroll's user avatar
  • 11
0 votes
0 answers
669 views

Applying SonarQube Source File Exclusions

Using SonarQube 9.6.0, I have a file frontend/frontendUI/src/services/mock-data.ts that contains, as per its name, a lot of quick-and-dirty mock data, which does not really make any sense or confirms ...
Zsar's user avatar
  • 211
0 votes
0 answers
235 views

VS Code does not expand variables in its settings

Is it the expected behaviour that VS Code does not expand variables in its settings? My example: I need to configure Remote.SSH: Config File to point to a file relative to my home directory. Verbatim ...
pabouk - Ukraine stay strong's user avatar

1
2 3 4 5
26