Okay, so I'm trying to do something that should be rather simple but for some reason I can't quite seem to make it work. All I simply want to do is add a path to the PATH environment variable in openSuse.

So far, I've edited the following line in /etc/default/su :


with this line :


Basically, all I want to do is have access to php and mysqld regardless of how I log in directly from the command prompt without having to type trailing /usr/local/php/bin/ every time. Am I even editing the right file?

I'm a bit of a Linux newbie and to achieve something as trivial as this is eluding me. Server gods out there, drop be a crumb, please? :-)

2 Answers 2


Changing /etc/profile, /etc/csh.login, /etc/csh.cshrc, indeed can (shan't) be changed.

However on Suse, if you notice that these files indicate that you should use any of these files /etc/profile.local, /etc/csh.login.local and /etc/csh.chsrc.local to establish local environmental modifications. Making changes in these files should isolate you a little bit better in the event of upgrades to the basic packages which may modify these files.


You're right, you should add it to the path.

Typically server-wide shell environment for bash is in /etc/profile. For (t)csh it is /etc/csh.login.

Rather than setting the PATH system-wide, I'd recommend setting it for your individual user. You would specify the PATH in .bash_profile or .cshrc in your home directory.

If you want recommendations for a different shell, you will need to identify what shell you use. If your situation is a special case, you will need to provide additional details, such as how you are authenticating to what user.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .