The sh utility shall behave as specified in POSIX 1003.1-2001 (ISO/IEC 9945-2003), but with extensions listed below.
The shell shall support an additional option, -l (the letter ell). If the -l option is specified, or if the first character of argument zero (the command name) is a '-', this invokation of the shell is a login shell.
An interactive shell, as specified in POSIX 1003.1-2001 (ISO/IEC 9945-2003), that is also a login shell, or any shell if invoked with the -l option, shall, prior to reading from the input file, first read and execute commands from the file /etc/profile, if that file exists, and then from a file called ~/.profile, if such a file exists.
Note: This specification requires that the sh utility shall also read and execute commands in its current execution environment from all the shell scripts in the directory /etc/profile.d. Such scripts are read and executed as a part of reading and executing /etc/profile.