• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bash $PATH variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash $PATH variable


  • Subject: Re: bash $PATH variable
  • From: Michael Cashwell <email@hidden>
  • Date: Fri, 20 Aug 2004 08:01:36 -0400

On Aug 20, 2004, at 7:42 AM, Professor Leslie Smith wrote:

Hi:

Using Carbon, I can make a command line executable. But how do I change the PATH environment variable so that Terminal finds it? I tried editing up a .bashrc file (and putting it in my home directory), but to no effect.

I tried writing
PATH=$PATH:/Users/lss/bin; export PATH
just as a command line in terminal, and that works fine.

Where am I meant to put it so that terminal will set it up when a new terminal starts (just for myself as user).

For Bash you want to put this in ~/.profile

I have these two lines (among others) there:

PATH=$PATH:/Developer/Tools
export PATH

which adds the dev tools' path to my environment. (The XCode install did this.)

You can also do this in a way that will be made available to all apps run at the console (GUI apps too). It has the benefit that it no longer matters which shell you use.

To do this add the variables to a plist file at ~/.MacOSX/environment.plist as key/string pairs in a dictionary. (You can text-edit that file but using the plist editor will make it less tedious.) You must log out and back in for any changes to take effect.

Enjoy!

-Mike
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: bash $PATH variable
      • From: Markian Hlynka <email@hidden>
References: 
 >bash $PATH variable (From: Professor Leslie Smith <email@hidden>)

  • Prev by Date: bash $PATH variable
  • Next by Date: Xcode 1.5, Java, and Cryptography? New Mac Developer here
  • Previous by thread: bash $PATH variable
  • Next by thread: Re: bash $PATH variable
  • Index(es):
    • Date
    • Thread