Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    The second paragraph is interesting. Since different shells support different syntax, this would require that there be a significant common syntax. True for bash and sh, but I don't think so for others like csh or tcsh, which have their own global login startup scripts. On many systems, /bin/sh is just a link to /bin/bash. But bash modifies its behavior to be posix-compliant when invoked as sh. So one would think that authors of scripts in /etc/profile.d would need to be careful to avoid using bash extensions outside the posix subset. Commented Oct 10, 2014 at 6:28
  • Under linux there are separate .csh and .sh files for the two major shell types. Commented Jan 13, 2015 at 14:25
  • 4
    /etc/profile is not processed by all shells. zsh does not. At least not on debian 11. Commented Dec 6, 2020 at 9:05