I'm using bash, and I want to be able to execute a script just by typing its name as a command, same as pwd
for example.
Is there a specific directory where I need to save my script to, or any other system files I need to edit to achieve this?
I'm using bash, and I want to be able to execute a script just by typing its name as a command, same as Is there a specific directory where I need to save my script to, or any other system files I need to edit to achieve this? |
||||
You have to install that script in one of the directories of
|
|||||
|
You can check what locations are currently checked for direct commands by looking at the
It's likely this includes
Now you can just type |
|||
|
In addition to making sure the script is in the $PATH, you also must make the script executable. |
|||
|
You may want to check the |
|||||||||||||
|
/usr/bin
or/usr/local/bin
– Miline Mar 29 at 11:21