Running a command or script in terminal from anywhere by adding it to the PATH, what am I doing wrong?
Posted
by
Joe
on Server Fault
See other posts from Server Fault
or by Joe
Published on 2012-10-26T23:18:59Z
Indexed on
2012/10/27
11:05 UTC
Read the original article
Hit count: 341
bash
On osx/linux I want to be able to run a command/script on the terminal from anywhere which links to a program.
ie I want to be able to run:
alloy
that runs:
/usr/local/share/npm/lib/node_modules/alloy/bin/alloy
I'm guessing adding to .bashrc is the best way? I've tried running:
export PATH="$PATH:/usr/local/share/npm/lib/node_modules/alloy/bin"
and also:
export PATH="$PATH:/usr/local/share/npm/lib/node_modules/alloy/bin/alloy"
Then I started a new terminal window but the alloy command doesnt work. Am I missing something?
© Server Fault or respective owner