How can I make a program executable from everywhere?

How can I make a program executable from everywhere?
Answer
2 Answers
  1. Make the scripts executable: chmod +x $HOME/scrips/* This needs to be done only once.
  2. Add the directory containing the scripts to the PATH variable: export PATH=$HOME/scrips/:$PATH (Verify the result with echo $PATH .) The export command needs to be run in every shell session.
11 июл. 2019 г.
 

Tìm kiếm

Back
Top