open Bash_profile file `code ~/.bash_profile` or `open -e ~/.bash_profile` write your variable ` export VAR_NAME='hello' ` save file and close then close terminal reopen terminal and echo your variable to confirm `echo $VAR_NAME` should say hello