JF Mezei <> wrote:
> many many thanks. So if I want to add system wide stuff and aliases, I
> should add it to /etc/profile ? Or is that file likely be overwritten by
> any software upgrade ?
> If a user has a different shell, does this mean that /etc/profile
> doesn't necessarily get invoked and there is a totally different chain
> of files that are invoked ?
I think you would have to read the man pages for each shell offered, I don't
think /etc/profile is considered universal.
What I do think that is common is, the stuff in the user home directory is
the last placed checked.
In many svr4 systems, there used to be /etc/skel which was a directory to
drop in the custom login and profiles for that box/machine. When a user was
created, you usually dropped in copies from there to the home.
Since the users home directory is the last placed checked for customized
settings, it sort of makes more sense to drop in the profile/login/bashrc or
whatever else the desired shell uses there, than to modify the files in
/etc.
Although you can edit the /etc files to your hearts content, it's just one
of those "best practices" kind of thing.
-bruce