Setting environment variables osx 12.0.1

Viewed 4359

I need some help to set environment variables on osX 12.0.1. I tried to edit .bash_profile (it doesnt exist), .zprofile and also a pllist approach. What irritates me, is that % env is not working in Terminal. Any hints for a newbee? Any help appreciated! :)

1 Answers

You can set the environment variable in ~/.zprofile

eval "$(/opt/homebrew/bin/brew shellenv)"
export PATH=/opt/apache-maven-3.5.2/bin:$PATH
export PATH=$PATH:/usr/local/go/bin
export JAVA_HOME=$(/usr/libexec/java_home)

This works fine for macOS Monterey

Related