Add an environment variable to Bash or Zsh (MacOS)

Add to Zsh

Step 1. Add to Zshrc.

echo 'export variable=value' >> ~/.zshrc

Step 2. Apply change

source ~/.zshrc

Add to Bash

Step 1. Add to bash profile

echo 'export TK_SILENCE_DEPRECATION=1' >> ~/.bash_profile

Step 2. Apply change

source ~/.bash_profile

Loading

What’s your Reaction?
+1
0
+1
0
+1
0

Leave a Reply

Your email address will not be published. Required fields are marked *