Education » Computer Science » Operating Systems

ID #1041

How to add environmental variables like PATH, MANPATH in Mac?

Let's take SMV as an example. To add the path of some binary files to the Mac system, there are multiple ways.

Someone may want to modify /etc/profiles, however it is suggested that modifications to the above files may result in serious system problems. Instead,make changes in your personal home directory, e.g., ~/.profile.

cd ~/.profile;

add the following information accordingly, e.g. for Cadence SMV,

export PATH=$PATH:/Projects/smv/bin
export MANPATH=$MANPATH:/Projects/smv/man
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Projects/smv/lib

Note that for the last statement, LD_LIBRARY_PATH will be used on Linux.

These changes will not take effect immediately, so do the following to reflect the changes (to reload the file):

source ~/.profile

Now type the command to see if it's system wide available.

Tags: configuration

Related entries:

Last update: 2009-01-28 13:08
Author: Admin
Revision: 1.0

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Propose a translation for Propose a translation for
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You can comment this FAQ