Switcher Hangout The place for switchers to discuss their new machines, and how to work with OS X. General support can be had here for newbie stuff, like "How do I restart my new iMac?" :)

path environment variable


Post Reply New Thread Subscribe

 
Thread Tools
blackwaterdev

 
Member Since: Oct 27, 2004
Posts: 49
blackwaterdev is on a distinguished road

blackwaterdev is offline
How do I view my path environment variable in mac OS x? I am trying to install a development tool and the location should now be in the path but I want to see it to make sure.

Thanks!
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: South-East Texas
Posts: 1,805
cradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to all
Mac Specs: 21in Dual core 3 ghz iMac, 13in Macbook - Mountain Lion on both

cradom is offline
You can type set or env in the Terminal. They show slightly different things but both show PATH.
Also you can 'echo $PATH'.
Depends on exactly what you're looking for.
QUOTE Thanks
blackwaterdev

 
Member Since: Oct 27, 2004
Posts: 49
blackwaterdev is on a distinguished road

blackwaterdev is offline
Quote:
Originally Posted by cradom
You can type set or env in the Terminal. They show slightly different things but both show PATH.
Also you can 'echo $PATH'.
Depends on exactly what you're looking for.
Thanks,

How do I now add an environment variable and then append to the path?

Thanks!
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: South-East Texas
Posts: 1,805
cradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to allcradom is a name known to all
Mac Specs: 21in Dual core 3 ghz iMac, 13in Macbook - Mountain Lion on both

cradom is offline
To add something to the path put something like this into .bash_profile or .bashrc:

PATH="/whatever/youneed/toadd{PATH}"
export PATH

For example:
PATH="/usr/local/bin{PATH}"
or
PATH="~/craig/bin:/Volumes/HD3/downloads{PATH}"

After you add this restart Terminal.
QUOTE Thanks
LuckyinVA

 
Member Since: Jan 26, 2013
Posts: 4
LuckyinVA is on a distinguished road

LuckyinVA is offline
Thanks cradom I found this post useful. Would you mind explaining the difference between doing this and editing the /private/etc/path file is? I was told by another mac owner to make my change there to resolve a problem I was having with homebrew. My new mac doesn't have a .bash_profile or .bashrc file like my work mac does. I appreciate any help I can get here. Thanks.

looking to resolve homebrew warnings about the order of /usr/bin and /usr/local/bin
QUOTE Thanks
chas_m

 
chas_m's Avatar
 
Member Since: Jan 22, 2010
Location: Victoria, BC
Posts: 13,696
chas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond reputechas_m has a reputation beyond repute
Mac Specs: 2009 MacBook Pro, Black speakers, Black Benq second monitor, black iPhone 4, Black 2012 iPad, etc.

chas_m is online now
With respect, this thread might be much better suited to the "OS X - Operating System" forum or even the "OS X - Development and Darwin" forum, where you are likely to get more people helping than in "Switcher's Hangout," which is normally about helping PC buyers choose and learn their first Mac.
QUOTE Thanks

Post Reply New Thread Subscribe


« Hi, help for a frrustrated new mac user | iphoto image renumbering »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
how can i set the path? Bo Eddy OS X - Development and Darwin 1 05-12-2004 10:45 AM
Getting the full path of a file rcwhite OS X - Operating System 1 03-13-2004 01:36 AM
tsch script - nested loop dynamic variable reference lizardthefish OS X - Development and Darwin 0 03-04-2004 11:53 PM
Scripting a cron job to post data to a url via variable lizardthefish OS X - Development and Darwin 4 02-14-2004 04:33 PM
Upgrade path to Panther for recent purchse? OS10 Server? lokerd OS X - Operating System 2 10-13-2003 08:32 AM

All times are GMT -4. The time now is 04:59 PM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?