1

I am trying to install some scripts into linux and follwoing line is given as instruction.

  1. Install the xyz script into some convenient directory in $PATH.

but I'm unable to understand what exactly does it mean.How do I install given script in $PATH directory.Script is placed under /users/username/ Dir.

4

3 回答 3

2

In a terminal type echo $PATH. You will see a list of directories. Put your script, or a link to your script in one of those directories, typically in /usr/local/bin.

于 2013-01-21T10:23:16.227 回答
2

its a bad description of the script-author :) usually, in your $PATH are multiple directories mentioned, separated by colon.

you can echo them:

echo $PATH

What the Author means: just copy the script in a directory which is in your $PATH, e.g. /usr/local/bin

于 2013-01-21T10:25:19.233 回答
1

$PATH is a list of directories where bash looks for executables.

The given instruction suggests that yours scripts should be put in one of these directories.

An alternative is to put your scripts in any directory and add that directory to $PATH. In your case, add the following line in your $HOME/.bash_profile configuration file:

export PATH=$PATH:/users/username
于 2013-01-21T10:23:57.960 回答