TransWikia.com

Set permanent environment variable for all shells

Unix & Linux Asked by user14492 on October 31, 2021

I want to set the root level environment variable that comes from sh(1) so that it is shared across all shells: sh, bash, zsh, and fish.

I can see in /etc/profile there’s a command /usr/libexec/path_helper -s which prints default values of PATH but it also has custom values set by other tools like gcloud, mono. How do those do this? I want to share my custom values as well.

I’m not going to add them to /etc/profile because that can be changed due to an update and I don’t see gcloud/mono/conda specify their paths there. So what is the correct solution?

Any tips for keep all shells in sync would be very helpful.

I’m on macOS Catalina: 10.15.5 (19F101)

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP