Running a Custom Command as Superuser Using sudo?

by Sarah Szabo   Last Updated August 14, 2019 19:02 PM

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 /bin, /usr/local/bin, and /usr/local/sbin, but when I try running sudo Wandering_Echo, I get this error:

[email protected]:/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.



Related Questions




Run .sh script on Ubuntu without using terminal

Updated April 05, 2015 18:00 PM

Error when running script in bash

Updated April 16, 2015 21:00 PM

Exit terminal after running a bash script

Updated April 20, 2015 22:00 PM