Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
37
rated 0 times [  37] [ 0]  / answers: 1 / hits: 33797  / 2 Years ago, tue, august 30, 2022, 2:43:19

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?


More From » permissions

 Answers
6

You have to add the path to the sudo path.



Run the command sudo visudo



you will see a line like this:



Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:$


Now add the path of your command here and this should work.



For example:



$ sudo storm
sudo: storm: command not found


Now add the path as above:



$ sudo visudo 

secure_path="......:/opt/storm/bin"


save and exit.



now sudo storm will just work normally.



Note You should also add the path to the default path in /etc/profile.


[#20459] Tuesday, August 30, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
teromato

Total Points: 139
Total Questions: 102
Total Answers: 100

Location: Liechtenstein
Member since Mon, May 15, 2023
1 Year ago
;