I want to add some command to PATH so that I can use them conveniently, such as:
export $PATH = "$PATH:/opt/storm/bin"
but sometimes storm
need root authority, but when I use it with sudo
, Ubuntu cannot find the command.
sudo storm nimbus
how can I find these command when I use sudo
?
Best Answer
You have to add the path to the
sudo
path.Run the command
sudo visudo
you will see a line like this:
Now add the path of your command here and this should work.
For example:
Now add the path as above:
save and exit.
now
sudo storm
will just work normally.Note You should also add the path to the default path in
/etc/profile
.