Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Do we have anyway to add a path globally so that each user gets it in $PATH. I want to add path of ANT so that each user doesn't need to add it in his $PATH variable.

share|improve this question
If you intend users to run a particular shell, say bash, then you could add the export line in /etc/bashrc as it will be read systemwide. – Ketan Dec 11 '13 at 16:54
up vote 13 down vote accepted

Global paths should be set in /etc/profile or /etc/environment, just add this line to /etc/profile:

share|improve this answer

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
share|improve this answer
The OP tagged it [AIX], though... – Jeff Schaller Feb 22 at 21:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.