Take Control of the Mac Command Line with Terminal (2.0) by Joe Kissell

Take Control of the Mac Command Line with Terminal (2.0) by Joe Kissell

Author:Joe Kissell [Joe Kissell]
Language: eng
Format: epub
Publisher: leanpub.com
Published: 2015-04-23T04:00:00+00:00


Modify Your PATH

As I explained in How Your PATH Works, when you run a program by entering just its name, your shell looks for it in several predetermined directories. You may want to specify additional places where programs or scripts are located, to make it easier to run them. For example, if you’re experimenting with your own scripts and you store them all in ~/Documents/scripting, you should add that directory to your PATH.

To add a directory to your PATH, put this in your .bash_profile:

export PATH=$PATH:/your/path/here

For example, to add the directory ~/Documents/scripting, enter this:

export PATH=$PATH:~/Documents/scripting

You can add as many of these export statements as you need. You can also add multiple directories to your PATH in a single export statement by separating them with a colon, like so:

export PATH=$PATH:~/Documents/scripting:/Library/Scripts



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.