|
How do I tweak my PATH?
A reader writes:
"I've got a few of your books and today picked up Wicked Cool Shell Scripts, which I'm very much looking forward to working with. Open up that file (or create one if you don't have it yet) by using vi, pico, emacs, jove, or whatever else is your favorite editor in Terminal.app. Then append your desired directory to the end of the existing PATH value like so: export PATH="${PATH}:/Users/joe/bin"Close that terminal window and open another (File -> New Shell), then type echo $PATH and you should see your specified path appended to the end. Then just make sure you have that directory (you can use mkdir ~/bin to create it if needed). Now you can drop scripts and programs into that file to your heart's content, and they'll automatically be found when you type in their names to the shell. Note that there's a slight variation on this that can work too, and that might be more commonly used, as demonstrated by this actual entry in my own ~/.bash_login file: PATH="${PATH}:/sw/bin:/usr/X11R6/bin:/Users/taylor/bin"; export PATHHope that helps clear things up!
Categorized:
Unix and Linux Help
(Article 3689,
Written by Dave Taylor)
Tagged: Previous: How do I get my environment to come along when I "su"? Next: Chopping off the last field of each line? Subscribe!
Rather amazingly, there are no comments on this article yet.
I have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |