I want to launch Intellij IDEA IDE via sudo idea.sh
. sudo
because IDE needs to manupulate files from /etc/share
. idea.sh
is placed at /home/<username>/<path>/bin/idea.sh
.
I tried to add this path to PATH
environment variable by adding export PATH="$PATH":<path-to-idea>/bin
to /etc/profile
or by changing string in /etc/environment
from PATH="blahblah"
to PATH="<path-to-idea>/bin:blahblah"
. In both cases after sudo echo $PATH
command I got string with my path to IDEA added.
But when I tried to execute idea.sh via sudo idea.sh
I got sudo: idea.sh: command not found
. What am I doing wrong?
sudo -E idea.sh
to preserve your environment. You may get an error. – glenn jackman Feb 21 '14 at 23:04sudo -i idea.sh
will do – Feb 21 '14 at 23:52-bash: idea.sh: command not found
– kassie Feb 21 '14 at 23:54/usr/local/bin
. – Gunnar Hjalmarsson Feb 22 '14 at 05:32/usr/local/bin
? – kassie Feb 22 '14 at 11:32