nana
nana

Reputation: 15

how to set up the environment variables on mac os x

I am trying to download myrna tool on mac os x. for one of procedures on installation, "Set the MYRNA_HOME environment variable to point to the extracted directory (containing myrna_emr)"

So i tried this way

echo "export MYRNA_HOME=/.../....directory/.." >> ~/.bashrc

but it seems it does not work.(when i type echo MYRNA_HOME in command line, there is nothing OR when i type printenv MYRNA_HOME does not come out.)

anyone who knows how to set up Env Vars??

thank you,

Upvotes: 0

Views: 2208

Answers (1)

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181460

There are several ways to do that. One would be adding your variable to ~/.bash_profile file.

Example:

MYRNA_HOME=/whatever/you/want/
export MYRNA_HOME

Then you can try if it works by logging in again and trying on a terminal:

$ echo $MYRNA_HOME

It should print whatever you set MRYNA_HOME to on ~/.bash_profile.

If you want the environment variable to be available to all users, you can change /etc/bashrc file. But I would prefer just changing one users' environment.

Upvotes: 1

Related Questions