Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

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).

0 votes
2 answers
105 views

As the title says. WinGet has a package called cURL.cURL. However, installing it doesn't do what you would expect it to do. Any invocation of curl via command line or otherwise will use the curl.exe ...
Cherona's user avatar
  • 442
2 votes
1 answer
75 views

I need to run the following as admin from a non-elevated session. This works if initiated from an elevated one. [Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\MyPath&...
fishmong3r's user avatar
8 votes
2 answers
2k views

I started up a new PC, a Beelink Mini S-13 delivered by Amazon from a marketplace seller. It arrived in untouched cellophane shrink-wrapped packaging. This has Windows 11 preinstalled. I went through ...
RedGrittyBrick's user avatar
2 votes
1 answer
496 views

I'm running VS Code with Remote SSH. When I open a zsh terminal, the entry in $PATH is missing for VS Code server, and so I can't run code --wait filename (which I like to have set as my $EDITOR ...
Gary van der Merwe's user avatar
8 votes
2 answers
291 views

Is there a good way to use environment modules to set up conda as an alternative to conda init? In our HPC environment we have many versions of many different tools, and often when users switch ...
MartinLB's user avatar
0 votes
2 answers
166 views

I am using docker compose to pull the image and run the container. During this process I am calling a shell script to encrypt DB password and using export command I export to a variable. e.g. export ...
AAPJ's user avatar
  • 1
0 votes
2 answers
285 views

I'm installing SonarQube Community Build on Ubuntu. I've installed Java from a .tar.gz to /opt/java. I've added JAVA_HOME=/opt/java/ and SONAR_JAVA_PATH=/opt/java/bin/java to my .profile file. echo $...
berger-devel's user avatar
1 vote
1 answer
279 views

I'd like to bind-mount my AWS credentials file into a DevContainer for development in VS Code, in a portable manner so other colleagues can develop on their machines too, so I need a relative ...
Elliott B's user avatar
  • 1,387
1 vote
1 answer
249 views

I'm trying to write a PowerShell script that copies a temporary directory on the local PC, copies files and folders from the server to the temporary directory and finally executes a setup installer ...
willowen100's user avatar
1 vote
4 answers
1k views

I want to launch a new instance of a program or shell, such as Far (or cmd) with some specific environment variables set. I prefer to make a batch file for this. I try the following: in the ...
Alexander Gelbukh's user avatar
1 vote
2 answers
537 views

I would like to have a different bash history per VSCode workspace. It seems setting: "terminal.integrated.env.linux": { "HISTFILE": "${workspaceFolder}/.bash_history" ......
plswork04's user avatar
  • 233
0 votes
0 answers
195 views

I am having an issue with WSL it is not loading my proxy info into /etc/environment/ it loads everything else. Windows 11 populates the HTTP_PROXY variable by way of .wslconfig stored on the host ...
Jonathan Lee's user avatar
0 votes
0 answers
62 views

I am facing the problem that openssl tries to load an invalid openssl.cfg file (like described here https://stackoverflow.com/questions/7360602/openssl-and-error-in-reading-openssl-conf-file). The ...
Jack Miller's user avatar
0 votes
0 answers
68 views

I'm trying to make a batch file to help generate a large amount of files that are similar but differ in name as well as called variables inside the files the file would contain a variable-name that is ...
Noku 269's user avatar
1 vote
0 answers
82 views

I have recently moved to Linux on my computer, and my bash terminal just looks dull. I customized the PS1 variable in the .bashrc, but that still didn't help. I want to be able to put a more ...
Strider's user avatar
  • 11
0 votes
0 answers
193 views

In my process of installing java (as part of weblogic) with ansible I get this issue. I have seen that before from time to time, but cannot recall the solution. I have a new linux user "weblogic&...
groovehunter's user avatar
1 vote
0 answers
23 views

So, I have been having a recurring problem with Windows, thought it was a Windows 10 issue, upgraded to 11, and suddenly realized it still existed, Shows unity calling a package with the "g" ...
Mmneaa's user avatar
  • 11
5 votes
2 answers
18k views

There aren't many guides available on adding a folder to the Windows 11 user Path environment variable. This is useful for new programmers to be able to easily run code using command prompt. An answer ...
Melanie Shebel's user avatar
2 votes
1 answer
2k views

Let us define this very small bash function: function testit() { a=4 echo "Hello world" } if I run the function, then variable a will take the value 4 (which is the expected outcome): ...
jicarretero's user avatar
0 votes
0 answers
2k views

I'm writing documentation, and I want to be able to tell those who read it whether or not they have to set their path variable to be able to run an executable without the full path attached to the ...
JAYD3V's user avatar
  • 1,409
0 votes
4 answers
443 views

I have this in my .bashrc file export ANDROID_HOME=$HOME/Android export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin I can run a program anywhere inside the directory set: adb devices // but no ...
T D Nguyen's user avatar
0 votes
0 answers
557 views

I've been having an issue with my Windows 11 computer that has become increasingly frustrating. Whenever I install a new CLI tool (most recently AWS CLI), it is never manually added to my PATH. Even ...
okay's user avatar
  • 1
2 votes
2 answers
324 views

A command find . -type f was issued on one of our servers by one of our users and its currently running when viewed in ps aux. How can I know from which directory was this command issued. Does that ...
rooni's user avatar
  • 173
0 votes
1 answer
65 views

I messed up with Windows 10 PATH and now many programs are not recognized any longer, like for example git.exe At system level I have the following PATH: %SystemRoot%\system32 %SystemRoot% %...
Barzi2001's user avatar
  • 183
1 vote
1 answer
63 views

What it says on the tin. I want a system variable %dl% = %USERPROFILE%\Downloads for Jon: %dl% = C:\Users\Jon\Downloads for Ann: %dl% = C:\Users\Ann\Downloads and so forth. Will that work, or do I ...
MsLis's user avatar
  • 133
0 votes
0 answers
94 views

Why are the so many C:\WINDOWS\system32\WBEM entry's in the $PATH variable? I deleted them all except for 1 but after a while they are back again.... Only 1 is necessary. Not 8!! Path variable --------...
Hans de Ruiter's user avatar
2 votes
0 answers
202 views

I would like to achieve something similar to SSH agent forwarding with Windows 10 and Remote Desktop. Let's say I have some secret on my host, either in an environment variable or in Windows ...
Jytug's user avatar
  • 121
1 vote
0 answers
166 views

I was trying to configure the MobaXterm configurations to different hosts and was trying to use windows variables inside the host configuration. Unfortunatly it doesn't seem to work properly and seems ...
Ziazis's user avatar
  • 11
0 votes
0 answers
390 views

I am using Strawberry Perl to run Perl on Windows 10. The problem is: whenever I type a Perl command, it always shows warning messages like below: command: perl -v result: perl: warning: Setting ...
Becker's user avatar
  • 155
0 votes
1 answer
195 views

I'm having some issues with Windows 10. After fixing my temp INET folder which somehow was pointing at a different account, I've now found an odd issue. If I type echo %localappdata% in CMD, it gives ...
user3714877's user avatar
1 vote
0 answers
533 views

(See also: Why does Windows have a limit on environment variables at all?) According to the Windows app development documentation, “The maximum size of a user-defined environment variable is 32,767 ...
Ginger Jesus's user avatar
-2 votes
1 answer
51 views

I'm looking for a list of the macro strings known to Window 10 command processor, e.g. %ProgramFiles%, %ProgramFiles(x86)%, etc.
Max Yaffe's user avatar
  • 147
0 votes
0 answers
264 views

I have randomly bumped into this as I can clearly see that PATH variable is not populated in the process that I'm now starting as a service on Windows 11, while the same exact script when started from ...
Roman Yankin's user avatar
1 vote
2 answers
7k views

I am learning about environmental variables. I know for example that if I have a secret password I should not code it inside of my code. From what I understood is that a .env file should be used to ...
Federico Gentile's user avatar
3 votes
1 answer
537 views

On my Linux systems, I prefer the user interface to be in English. However, as a native speaker of German, I need spell checking to understand both English and German. Yesterday I've learned that you ...
scy won't contribute anymore's user avatar
0 votes
0 answers
382 views

I had a working java 8 application in my windows asset until I installed jdk11 using Ubuntu package. Now when I give java -version cmd in Ubuntu I get the openjdk 11 version: $ java -version openjdk ...
user avatar
2 votes
2 answers
2k views

The situation is as follows: Windows 10 22H2 (referred to as System A for short) cannot start (installed on hard drive A), nor can it enter safe mode or other startup modes, as starting will result in ...
S-N's user avatar
  • 123
0 votes
2 answers
381 views

I have quite many environment variables scattered both in User Variables and System variables, and I cannot add more variables, which leads me to a question: is there an upper limit on the number of ...
coderodde's user avatar
  • 135
0 votes
0 answers
23 views

Getting this error in windows 10 64 bit I did enable to enter long size path from the registry My question is how to disable this character limitation ? I most say that this limitation is happening ...
user71020's user avatar
  • 617
1 vote
0 answers
619 views

I'm trying to set up Sabnzbd and this is what I'm attempting to set: I am getting this message: s6-linux-init: warning: unable to dump kernel environment to /run/s6/container_environment: Is a ...
ErocM's user avatar
  • 173
4 votes
2 answers
1k views

in windows I would like to have a cmd script that I can run which sets an environment variable. The variable should still be set after the script executes. The variable is a token of sorts and is ...
George's user avatar
  • 179
0 votes
1 answer
708 views

I have added SendEnv whatever_* in ~/.ssh/config on the local host and AcceptEnv LANG LC_* whatever_* in /etc/ssh/sshd_config on the remote host. Now, I'm trying to run some stuff on the remote ...
Bogdan Prădatu's user avatar
2 votes
0 answers
1k views

If I try to commit something, I'm getting this error. > git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - -S error: gpg failed to sign the data: gpg: skipped <redacted&...
Sntn's user avatar
  • 175
0 votes
0 answers
116 views

Few days ago I installed Tesseract OCR by installing Capture2Text via Chocolatey. This proved not to work, and instead of uninstalling Capture2Text I went ahead and deleted the Capture2Text folder ...
Elizabeth V.'s user avatar
2 votes
0 answers
1k views

I noticed that commands weren't working in my command prompt. I tried rebooting but still the same problem. Eventually after looking in this forum, I found out that my PATH variable was effectively ...
dacfer's user avatar
  • 197
0 votes
0 answers
133 views

When I run this command today, November 8, 2023 at 1100 GMT, the output is: 20231107180000: echo $(TZ=GMT+17 date +%Y%m%d%H%M%S) I would have thought that, if anything, GMT+17 would ADD 17 hours to ...
mscher's user avatar
  • 1
0 votes
1 answer
8k views

I edited env variables by pointing to kubectl and helm(after downloading them and storing into kube folder) when I go for kubectl in cmd,I got 'kubectl' is not recognized as an internal or external ...
Richard Rublev's user avatar
0 votes
0 answers
135 views

I have to create a set of folders based on an address list and then configure the permissions in active directory. Creating the folders and subfolders works for me, I adapted a few lines I found ...
Marin's user avatar
  • 1
2 votes
1 answer
1k views

So this is a very weird one. Let me start by saying that things used to work fine. I installed Node a few days ago and once complete I opened a command prompt (On Windows 10), I entered node --version ...
Jacques Ramsden's user avatar
0 votes
1 answer
9k views

I am making a "locked" batch file that only certain user can use so what I am doing right now is to check the condition if what the user write is == to %username% or other variable like this:...
NTF espolion 307's user avatar

1
2 3 4 5
27