7.15. Setting Up the Environment

#### Cross-Compiled Linux From Scratch - Version 1.0.0rc1-x86_64-Pure64

### Chapter 7. If You Are Going to Boot

- Prev

  Lilo-22.7.1

- Next

  Build Flags

- Up.
- Home

# 7.15. Setting Up the Environment

The new instance of the shell that will start when the system is booted is a login shell, which will read `.bash_profile` file. Create the `.bash_profile` file now:

    cat > ${LFS}/root/.bash_profile << "EOF"
    set +h
    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. Setting `LC_ALL` to “POSIX” or “C” (the two are equivalent) ensures that everything will work as expected on your temporary system.

By putting `/tools/bin` at the end of the standard `PATH`, all the programs installed in Constructing a Temporary System are only picked up by the shell if they have not yet been built on the target system. This configuration forces use of the final system binaries as they are built over the temp-system, minimising the chance of final system programs being built against the temp-system.

- Prev

  Lilo-22.7.1

- Next

  Build Flags

- Up.
- Home.