Add a path in $PATH globally for every user
Global paths should be set in /etc/profile
or /etc/environment
, just add this line to /etc/profile
:
PATH=$PATH:/path/to/ANT/bin
Many Linux distributions support the Linux Standard Base /etc/profile.d
directory where configurations such as additional paths directives can go without touching the stock system files. The file name just needs an .sh extension.
For example
cat >> /etc/profile.d/some_name.sh << \EOF
PATH=$PATH:/path/to/ANT/bin
EOF