If not sure if this is close to (or even a duplicate of) Why does sudo not add root's PATH with Ubuntu 12.04?, I'm still posting this question because I didn't understand anything from there, if this is a duplicate, please do not flag it as that, just explain it better than that question, or post another answer in the other question.
I installed ISE from Xilinx. I was advised to export the path, which I did by entering
echo "PATH=\$PATH:/opt/Xilinx/14.7/ISE_DS/ISE/bin/lin64/" >> ~/.bashrc
then
echo "export PATH" >> ~/.bashrc
That done, I can run then program by entering ise
in a terminal, but if I enter sudo ise
it won't work. I'm I forgetting something?.
sudo
overwrites the path for security reasons with a "secure" path. However you can modify this secure path to include your custom folder. Warning: this leaves your computer a bit unprotected. You can follow these steps for edit the secure path.sudo visudo
for edit/etc/sudoers
Find this line (it should be at the start of the file):
If do you want to include your custom path here, edit the
secure_path
variable. It would look like this:If do you want to bypass completely this security measure (not recommended), simply comment out that line. It will allow the
$PATH
variable to "pass" through thesudo
command