Changeset cedcdaa for BOOK/final-preps
- Timestamp:
- Feb 21, 2006, 1:27:06 AM (19 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 307e31eb
- Parents:
- 6bb43b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/final-preps/settingenviron.xml
r6bb43b3 rcedcdaa 11 11 <title>Setting Up the Environment</title> 12 12 13 <para >Set up a good working environment by creating two new startup13 <para os="a">Set up a good working environment by creating two new startup 14 14 files for the <command>bash</command> shell. While logged in as user 15 15 <systemitem class="username">lfs</systemitem>, issue the following 16 16 command to create a new <filename>.bash_profile</filename>:</para> 17 17 18 <screen ><userinput>cat > ~/.bash_profile << "EOF"18 <screen os="b"><userinput>cat > ~/.bash_profile << "EOF" 19 19 <literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal> 20 20 EOF</userinput></screen> 21 21 22 <para >When logged on as user <systemitem class="username">lfs</systemitem>,22 <para os="c">When logged on as user <systemitem class="username">lfs</systemitem>, 23 23 the initial shell is usually a <emphasis>login</emphasis> shell which 24 24 reads the <filename>/etc/profile</filename> of the host (probably … … 33 33 technique used here achieves the goal of ensuring a clean environment.</para> 34 34 35 <para >The new instance of the shell is a <emphasis>non-login</emphasis>35 <para os="d">The new instance of the shell is a <emphasis>non-login</emphasis> 36 36 shell, which does not read the <filename>/etc/profile</filename> or 37 37 <filename>.bash_profile</filename> files, but rather reads the … … 39 39 <filename>.bashrc</filename> file now:</para> 40 40 41 <screen ><userinput>cat > ~/.bashrc << "EOF"41 <screen os="e"><userinput>cat > ~/.bashrc << "EOF" 42 42 <literal>set +h 43 43 umask 022 … … 48 48 EOF</userinput></screen> 49 49 50 <para >The <command>set +h</command> command turns off50 <para os=f">The <command>set +h</command> command turns off 51 51 <command>bash</command>'s hash function. Hashing is ordinarily a useful 52 52 feature—<command>bash</command> uses a hash table to remember the … … 60 60 different location.</para> 61 61 62 <para >Setting the user file-creation mask (umask) to 022 ensures that62 <para os="g">Setting the user file-creation mask (umask) to 022 ensures that 63 63 newly created files and directories are only writable by their owner, 64 64 but are readable and executable by anyone (assuming default modes are … … 66 66 mode 644 and directories with mode 755).</para> 67 67 68 <para >The <envar>LFS</envar> variable should be set to the68 <para os="g">The <envar>LFS</envar> variable should be set to the 69 69 chosen mount point.</para> 70 70 71 <para >TO BE REWRITTEN - The <envar>LC_ALL</envar> variable controls71 <para os="h">TO BE REWRITTEN - The <envar>LC_ALL</envar> variable controls 72 72 the localization of 73 73 certain programs, making their messages follow the conventions of a … … 80 80 the chroot environment.</para> 81 81 82 <para >By putting <filename class="directory">/tools/bin</filename> ahead82 <para os="i">By putting <filename class="directory">/tools/bin</filename> ahead 83 83 of the standard <envar>PATH</envar>, all the programs installed in 84 84 <xref linkend="chapter-temp-system"/> are picked up by the shell … … 87 87 the same programs are available in the temporary system.</para> 88 88 89 <para >Finally, to have the environment fully prepared for building the89 <para os="j">Finally, to have the environment fully prepared for building the 90 90 temporary tools, source the just-created user profile:</para> 91 91 92 <screen ><userinput>source ~/.bash_profile</userinput></screen>92 <screen os="k"><userinput>source ~/.bash_profile</userinput></screen> 93 93 94 94 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.