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
Mac OS X Server: Avoid spaces and long names in network home directory name and path Newsbot Apple News 0 26th August 2008 07:11 PM
Mac OS X Server: Avoid spaces and long names in network home directory name and path Newsbot Apple News 0 26th October 2007 07:00 PM
$Path. Where can i find where my path is being set. Jeremy Kitchen Mac 12 9th July 2007 10:50 AM
Adding paths to bash shell? Bonge Boo! UK Macs 15 10th August 2005 02:12 PM
OSX: translate path with slashes to path with colons and volume name void Mac 1 24th June 2003 06:39 PM


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


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
Flash software cant be viewed in new macs
vivhope (4 Hours Ago, 03:51 PM)

can't text certain contacts
hannahroseviolin (8 Hours Ago, 11:14 AM)

iMac user running Logic 9, slow and sluggish across the board...
EddieBanda (17 Hours Ago, 02:08 AM)

Equals sign won't type
frisbeecat (18 Hours Ago, 01:01 AM)

help with external hard drive transfer
Marilyn (20 Hours Ago, 11:19 PM)