%general-entities; ]> Setting Up the Environment The new instance of the shell is a non-login shell, will read .bash_profile file. Create the .bash_profile file now: cat > ${LFS}/root/.bash_profile << "EOF" PS1='\u:\w\$ ' LC_ALL=POSIX PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbin export LC_ALL PATH PS1 EOF The LC_ALL variable controls the localization of certain programs, making their messages follow the conventions of a specified country. If the host system uses a version of Glibc older than 2.2.4, having LC_ALL set to something other than POSIX or C (during this chapter) may cause issues if you exit the chroot environment and wish to return later. Setting LC_ALL to POSIX or C (the two are equivalent) ensures that everything will work as expected in the chroot environment. By putting /tools/bin ahead of the standard PATH, all the programs installed in are picked up by the shell immediately after their installation. This, combined with turning off hashing, limits the risk that old programs from the host are being used when they should not be used any longer.