When logged in as root your home should be /root
To verify it; "echo $HOME".
Irregardless of the user that you are logged in
as, a directory called bin should exist in $HOME,
if it doesn't create it and put your executable
By default $HOME/bin is part of the directory path.
To verify it; "echo $PATH"
Then, make sure the script is set to executable.
To verify it; "ls -al <scriptname>"
You should see something like:
-rwxr--r-- 1 root root 27 Jan 01 01:01 <scriptname>
If the executable bit is not set, use "chmod" to
Now, regardless of what directory you are in while
you are logged in as root, you can just execute the
script by typing in the scriptname.
NOTE: Disregard the previous posters recommendation
to put it in any directory in the path, that is just