How to set global variable visible even for sudo commands?
1
vote
1
answer
1126
views
I have installed Maven on Ubuntu 16.04 following instructions .
I edited
/etc/environment
and added path to **maven/bin** folder to **$PATH** variable.
Under my normal user everything works just fine, but when I try to run e.g. sudo mvn test
it tells me that **mvn** is unknown command. Restart didn't help.
Error:
/bin/sh: 1: mvn: not found
I am also little perplexed by /bin/sh
piece - I am using bash.
So where should I put path to maven binary to make even sudo commands see it? Thank you.
Asked by lot
(113 rep)
Aug 8, 2018, 11:28 PM
Last activity: Aug 9, 2018, 01:03 AM
Last activity: Aug 9, 2018, 01:03 AM