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

I'm using a server running Suse Enterprise 11.1. I need to add some locations to the path for all users and for all the shells. Is there a nice and easy way to do this or do I have to modify the profile file for each shell.

Also I don't know if this is the default config for suse or if someone mess the server up, but there isn't a /etc/profile nor a /etc/shellnameprofile.local

How can I archive this? Please help.

share|improve this question
up vote 2 down vote accepted

Just add to /etc/profile.local and the PATH addition will survive upgrades for the regular users. For root check the .profile of root to see if you set the path hard-coded there.

share|improve this answer

You can set the default path for all users in /etc/login.defs.

ENV_SUPATH PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/extra/dir
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/extra/dir
share|improve this answer
I tried this but it didn't work. – Topo Feb 15 '13 at 21:45

Just in addition - If a SuSE dist and the bash shell is used, you can put the path modifications also into


export PATH
share|improve this answer
But if I need it to work in other shells like ksh it doesnt't work. – Topo Feb 15 '13 at 21:46
Yes, it's just an additional information for other SLES / bash users – domi27 Feb 16 '13 at 12:42

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.