Skip to main content
Ask Different

Questions tagged [environment-variables]

Environment variables are used to create shared settings that persist between invocations of applications. They are used to provide information such as paths to important directories, user information and other information programs need for common tasks.

Filter by
Sorted by
Tagged with
3 votes
1 answer
167 views

I was upgrading my development setup, and I found this path in my PATH variable: /opt/pmk/env/global/bin, and it's added by /etc/paths.d/10-pmk-global. Usually, a system-related program would go in /...
0 votes
0 answers
49 views

There seems to be a consensus that the PATH for macOS (any version) is some value set (exclusively) in /etc/paths and user-maintained shell scripts (notably /etc/profile and ~/.profile as well as ...
3 votes
1 answer
635 views

I am on an M3 Pro, MacOS 14.2. When I try echo $MACHTYPE (in a default -zsh shell) the output is x86_64, whereas uname -mp returns arm64 arm. Zsh docs say that MACHTYPE should be "the machine ...
0 votes
0 answers
113 views

On a Mac running macOS 13.5, $TMPDIR is not set in a new shell. This is a multi-user machine, and it is unset for all users that are sued to, causing multiple issues since libraries may default to /...
slhck's user avatar
  • 2,273
7 votes
0 answers
3k views

I'm looking for a way to set the PATH environment variable for all applications that I (and only I) run under macOS (version 14 / Sonoma at the time of writing.) That sounds like it ought to be ...
0 votes
1 answer
401 views

I am using zsh and I wanted to modify the $PATH variable permanently. I can't seem to find either .zshrc or .zsh_profile on my computer -- I tried searching in Finder with enabled hidden files. I ...
2 votes
0 answers
200 views

I need to set an env var for an app on MacOs. This is an app that I want to run on startup (currently via Login Items). I can set the env var as a LaunchAgent plist file with the RunAtLoad key set ...
3 votes
2 answers
309 views

I'm using launchd to set an env var at startup using launchctl setenv. The script works fine when the variable is hardcoded in it, but unfortunately I need to get this variable dynamically at startup ...
1 vote
1 answer
3k views

I have a variable set exactly like this: export VARIABLE_NAME=VARIABLE_VALUE I thought it would be in ~/.zshrc or bash_profile but it is seen in none of those. I am now struggling to understand where ...
3 votes
3 answers
2k views

When I use the "run shell script" in automator, and do, for example say $PATH it then tells me the PATH. But the path is incomplete. Some items I have in $PATH when using the terminal (zsh) ...
1 vote
2 answers
5k views

(EDIT OF 06/02/2023 : Previous title was Variables set using launchctl setenv aren't part of environment in Mac OS 12 ) I'm a daily Linux user and decided to try Mac recently. I have a Macbook pro 13&...
2 votes
1 answer
86 views

Running zsh on macOS Ventura → With sudo --preserve-env -s the environment variable ZDOTDIR is not preserved but all the others are. → With sudo --preserve-env=ZDOTDIR -s the variable ZDOTDIR is ...
0 votes
0 answers
495 views

I am trying to run mbsystem (a command-line tool for geodata processing) that for some commands uses a GUI based interface (e.g. if i type 'mbedit' in the command line, a window should open where i ...
1 vote
0 answers
219 views

When I start a Terminal (in Monterey 12.2.1) my LANG is sv_SE.UTF-8, which is fine. When I start a shell, or any other sub-process that reads environment, from GUI Emacs it is set to LANG="en_SE....
11 votes
2 answers
10k views

I'm a bit confused as to how all of this works. Seemingly every tutorial tells me something different. So far there's about 4 different files I can add environmental variables to: .zshrc .profile ....
user avatar

15 30 50 per page
1
2 3 4 5
...
8

AltStyle によって変換されたページ (->オリジナル) /