<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Mac OS X Tip: Setting PATH environment variables</title>
	<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables</link>
	<description>The world according to marky moo</description>
	<pubDate>Fri, 10 Feb 2012 08:35:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Jess</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145842</link>
		<author>Jess</author>
		<pubDate>Sun, 19 Sep 2010 15:43:35 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145842</guid>
		<description>Hey Mark -

You said:
&#62; On linux I used to edit my .bashrc file to do this, but the version of bash on Mac OS X (10.5.2) doesn’t seem to support this

This isn't exactly true. the .bashrc file is still used for executable shells in OSX, however it's he .bash_profile that is used in login shells (like the Terminal).   You'll want to edit to add paths, like this:

export PATH=$PATH:/usr/local/mysql/bin

regards</description>
		<content:encoded><![CDATA[<p>Hey Mark -</p>
<p>You said:<br />
&gt; On linux I used to edit my .bashrc file to do this, but the version of bash on Mac OS X (10.5.2) doesn’t seem to support this</p>
<p>This isn&#8217;t exactly true. the .bashrc file is still used for executable shells in OSX, however it&#8217;s he .bash_profile that is used in login shells (like the Terminal).   You&#8217;ll want to edit to add paths, like this:</p>
<p>export PATH=$PATH:/usr/local/mysql/bin</p>
<p>regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luc</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145671</link>
		<author>Luc</author>
		<pubDate>Sat, 03 Jul 2010 13:35:47 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145671</guid>
		<description>Thanks Felipe.  There are many different ways to change PATH at startup, but this is the one I like most.  (I'm using OS X 10.6.)  Just one thing: the path in the file mysql has to end with a newline, otherwise it won't be added properly to PATH.

Cheers
Luc</description>
		<content:encoded><![CDATA[<p>Thanks Felipe.  There are many different ways to change PATH at startup, but this is the one I like most.  (I&#8217;m using OS X 10.6.)  Just one thing: the path in the file mysql has to end with a newline, otherwise it won&#8217;t be added properly to PATH.</p>
<p>Cheers<br />
Luc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cheule</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145372</link>
		<author>Cheule</author>
		<pubDate>Sat, 26 Dec 2009 17:00:33 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145372</guid>
		<description>The good thing about using a profile configuration file like .bashrc, is that if you ever migrate your home folder to a new machine/OS X install, all your changes go with you.  If you edit things in /etc you are unlikely you retain such changes.

The place to put such changes in OS X 10.4 / 10.5 / 10.6 is in ~/.profile .  Specifically, I added the line "export PATH=$PATH:~/bin" (no quotes) to my ~/.profile file in order to allow me to install binaries into ~/bin.</description>
		<content:encoded><![CDATA[<p>The good thing about using a profile configuration file like .bashrc, is that if you ever migrate your home folder to a new machine/OS X install, all your changes go with you.  If you edit things in /etc you are unlikely you retain such changes.</p>
<p>The place to put such changes in OS X 10.4 / 10.5 / 10.6 is in ~/.profile .  Specifically, I added the line &#8220;export PATH=$PATH:~/bin&#8221; (no quotes) to my ~/.profile file in order to allow me to install binaries into ~/bin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Werner</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145322</link>
		<author>Werner</author>
		<pubDate>Mon, 27 Jul 2009 16:11:50 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145322</guid>
		<description>Mark and Felipe, 

many thanks! This helped me with an issue of webkit-image, a unix tool used for the JOSM editor of OpenStreetMap! 

Cheers, 
Werner</description>
		<content:encoded><![CDATA[<p>Mark and Felipe, </p>
<p>many thanks! This helped me with an issue of webkit-image, a unix tool used for the JOSM editor of OpenStreetMap! </p>
<p>Cheers,<br />
Werner</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Russell</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145270</link>
		<author>Russell</author>
		<pubDate>Sat, 16 May 2009 06:48:51 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145270</guid>
		<description>Additional info...

The path value in the file in Felipe's step 3 above is a clean/plain text path, not the path you'd type in a shell to set the PATH environment variable.

I used this technique for a path that had spaces in one of the folder names and when I had the backslash escapes, it wasn't working.  Removing the backslashes made it work like a charm.

Instead of these:
export PATH=$PATH:/Developer/Applications/PLT\ Scheme\ v4.1.5/bin
/Developer/Applications/PLT\ Scheme\ v4.1.5/bin

Use just this:
/Developer/Applications/PLT Scheme v4.1.5/bin

Regards,
-Russell</description>
		<content:encoded><![CDATA[<p>Additional info&#8230;</p>
<p>The path value in the file in Felipe&#8217;s step 3 above is a clean/plain text path, not the path you&#8217;d type in a shell to set the PATH environment variable.</p>
<p>I used this technique for a path that had spaces in one of the folder names and when I had the backslash escapes, it wasn&#8217;t working.  Removing the backslashes made it work like a charm.</p>
<p>Instead of these:<br />
export PATH=$PATH:/Developer/Applications/PLT\ Scheme\ v4.1.5/bin<br />
/Developer/Applications/PLT\ Scheme\ v4.1.5/bin</p>
<p>Use just this:<br />
/Developer/Applications/PLT Scheme v4.1.5/bin</p>
<p>Regards,<br />
-Russell</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jyothirmayee</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145218</link>
		<author>Jyothirmayee</author>
		<pubDate>Mon, 09 Mar 2009 11:37:25 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145218</guid>
		<description>Mark, Thanks so much for sharing this. 

After almost 2 days I landed on your blog. I wonder why most of the top results in google are misleading and there is nothing that is easily found on apple developers section either. You saved my day!</description>
		<content:encoded><![CDATA[<p>Mark, Thanks so much for sharing this. </p>
<p>After almost 2 days I landed on your blog. I wonder why most of the top results in google are misleading and there is nothing that is easily found on apple developers section either. You saved my day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marla</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145192</link>
		<author>Marla</author>
		<pubDate>Thu, 12 Feb 2009 19:12:42 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145192</guid>
		<description>Thank you both!  I'm also from unix but could find no dot file in my home dir where I set my path, but looking at the value of PATH, I obviously HAD modified it at least once in the past!  Sure enough, I had added something under paths.d, just four months ago, too.

What also drives me crazy is that when I search using spotlight, it ignores everything under /etc.  Guess I have to go back to using good old find from / if I really want to find things related to system administration.</description>
		<content:encoded><![CDATA[<p>Thank you both!  I&#8217;m also from unix but could find no dot file in my home dir where I set my path, but looking at the value of PATH, I obviously HAD modified it at least once in the past!  Sure enough, I had added something under paths.d, just four months ago, too.</p>
<p>What also drives me crazy is that when I search using spotlight, it ignores everything under /etc.  Guess I have to go back to using good old find from / if I really want to find things related to system administration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sirus</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145069</link>
		<author>sirus</author>
		<pubDate>Mon, 24 Nov 2008 14:17:21 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-145069</guid>
		<description>On Mac OS X exists a file that has the same role of the ~/.bashrc file on Linux and it's the ~/.bash_profile file.</description>
		<content:encoded><![CDATA[<p>On Mac OS X exists a file that has the same role of the ~/.bashrc file on Linux and it&#8217;s the ~/.bash_profile file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felipe</title>
		<link>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-144898</link>
		<author>Felipe</author>
		<pubDate>Thu, 31 Jul 2008 05:34:47 +0000</pubDate>
		<guid>http://www.sweeting.org/mark/blog/2008/05/26/mac-os-x-tip-setting-path-environment-variables#comment-144898</guid>
		<description>Hey there Mark.

I just read this post, great info. But after digging a little I found out that you can use another method to do what you're saying. You just have to create a file inside /etc/paths.d ; for instance if I'd like to append the mysql directory to the PATH I would do this:

1) Create the file /etc/paths.d/mysql like this:
   sudo touch /etc/paths.d/mysql
2) Edit the file:
   sudo vim /etc/paths.d/mysql
3) Put the path inside the file:
   /usr/local/mysql/bin

I posted three steps so everyone knows what they're doing, but you could do it all by just creating the file and filling it with the path needed in PATH.

I think this method works better because it is more ordered at the end and you would have a file for each path you want to create for every program that needs it.

Hope this helps.
Cheers. Felipe.</description>
		<content:encoded><![CDATA[<p>Hey there Mark.</p>
<p>I just read this post, great info. But after digging a little I found out that you can use another method to do what you&#8217;re saying. You just have to create a file inside /etc/paths.d ; for instance if I&#8217;d like to append the mysql directory to the PATH I would do this:</p>
<p>1) Create the file /etc/paths.d/mysql like this:<br />
   sudo touch /etc/paths.d/mysql<br />
2) Edit the file:<br />
   sudo vim /etc/paths.d/mysql<br />
3) Put the path inside the file:<br />
   /usr/local/mysql/bin</p>
<p>I posted three steps so everyone knows what they&#8217;re doing, but you could do it all by just creating the file and filling it with the path needed in PATH.</p>
<p>I think this method works better because it is more ordered at the end and you would have a file for each path you want to create for every program that needs it.</p>
<p>Hope this helps.<br />
Cheers. Felipe.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

