When logged on as user <systemitem class="username">lfs</systemitem>, or when switched to the &lfs-user; user using an <command>su</command> command with the <quote><parameter>-</parameter></quote> option, the initial shell is a <emphasis>login</emphasis> shell which reads the <filename>/etc/profile</filename> of the host (probably containing some settings and environment variables) and then <filename>.bash_profile</filename>.The <command>exec env -i.../bin/bash</command> command in the <filename>.bash_profile</filename> file replaces the running shell with a new one with a completely empty environment, except for the <envar>HOME</envar>, <envar>TERM</envar>, and <envar>PS1</envar> variables. This ensures that no unwanted and potentially hazardous environment variables from the host system leak into the build environment.
Lorsque vous êtes connecté en tant qu’utilisateur <systemitem class="username">lfs</systemitem> ou transféré vers l'utilisateur &lfs-user; en utilisant une commande <command>su</command> avec l’option <quote><parameter>-</parameter></quote>, le shell initial est un shell de <emphasis>connexion</emphasis> qui lit le fichier <filename>/etc/profile</filename> de l'hôte (contenant probablement quelques configurations et variables d'environnement) puis <filename>.bash_profile</filename>. La commande <command>exec env -i.../bin/bash</command> dans le fichier <filename>.bash_profile</filename> remplace le shell en cours par un nouveau shell ayant un environnement complètement vide en dehors des variables <envar>HOME</envar>, <envar>TERM</envar>, et <envar>PS1</envar>. Cela garantit qu'aucune variable d'environnement non souhaitée et potentiellement dangereuse provenant du système hôte ne fuit dans l'environnement de construction. La technique utilisée ici permet d'obtenir un environnement propre.