I've read a few posts such as Is there a standard place for placing custom Linux scripts? , Where should I put my bash scripts , but I still am getting an error that my script isn't being found in bash.
I've placed my script (Named Wandering_Echo) in
/usr/local/Custom_Programs and symlinked it into
/usr/local/sbin, but when I try running
sudo Wandering_Echo, I get this error:
sarah@LesserArk:/usr/local/Custom_Programs$ sudo Wandering_Echo ? sudo: Wandering_Echo: command not found
Not sure what I'm doing wrong as it is in the super-user bin directory.
Wandering_Echo does some low level filesystem operations using BTRFS, so it needs root to run. Edit 0: Wandering_Echo does run as regular user, just not as super-user from terminal.
sarah@LesserArk:/usr/local/Custom_Programs$ ls -l /usr/local/bin/Wandering_Echo /usr/local/Custom_Programs/Wandering_Echo lrwxrwxrwx 1 root root 14 Aug 14 15:22 /usr/local/bin/Wandering_Echo -> Wandering_Echo -rw-r--r-- 1 root root 96 Aug 14 13:09 /usr/local/Custom_Programs/Wandering_Echo
sarah@LesserArk:~$ sudo bash -c 'echo $PATH' [sudo] password for sarah: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin