简体   繁体   中英

What does it mean in Linux for installing script

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.

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 .

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, eg /usr/local/bin

$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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM