Mac Help Forums


Reply
Thread Tools Display Modes

Adding a directory to PATH in bash

 
New Member
Join Date: Aug 2006
Posts: 2
 
      24th August 2006
I am trying to add a directory to my PATH in bash (using Tiger OS 10.4.7). A book I have said to edit your ~/.profile file by using the VI editor. Well I can't find .profile. Am I not looking in the right place as I would like to know how to edit my PATH.

Steve
 
Reply With Quote
 
 
 
 
Ric Ric is offline
Senior Member
Ric's Avatar
Join Date: May 2004
Posts: 4,260
 
      24th August 2006
Hi there and welcome,

the chances are there isn't a file there already !

Code:
vi ~/.profile
then add in the new path, save and you should be okay.

Let us know if you're not sure !

regards

Ric
 
Reply With Quote
 
New Member
Join Date: Aug 2006
Posts: 2
 
      25th August 2006
Yes, it is not there (.profile). However my question then is how do I edit my PATH? Where is the file to edit it?

Steve
 
Reply With Quote
 
New Member
Join Date: Nov 2007
Posts: 1
 
      13th November 2007
in the terminal, in your home directory, type:
echo $PATH (to see the path, case sensitive)

to add to path, edit .profile using vi, pico or nano in the terminal, e.g.:
nano .profile (to create and/or edit the file)
PATH-$PATH:/Developer/Tools; export PATH (example to add the dev tools to path)
then save and exit using ^x (control-x)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Path to 'remote' Home directory corrupted! deano UK Macs 6 26th June 2009 07:58 AM
Adding paths to bash shell? Bonge Boo! UK Macs 15 10th August 2005 02:12 PM
tar'ing to local directory instead of full path? jollyprez Programmer Help 2 9th February 2005 07:01 AM
Adding local scripts to $PATH MacUser Mac 2 28th May 2004 12:08 AM
getting path of parent directory John Wain AppleScript 4 11th September 2003 01:19 AM


All times are GMT +1. The time now is 08:41 PM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
PDF Document
yura (8 Hours Ago, 12:13 PM)

Difficulties with internet speed (nothing to do with connection)
sammethh (14 Hours Ago, 06:36 AM)

Deleting a homepage/website form my mac book pro
rgandajg (22 Hours Ago, 10:30 PM)

MacBook
basil422 (1 Day Ago, 06:01 PM)

Outlook reminders not popping up
WonderBot (1 Day Ago, 05:03 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51