bashprofile.xml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <sect1 id="ch06-bashprofile">
  2. <title>Creating $LFS/root/.bash_profile</title>
  3. <para>When we have entered the chroot'ed environment in the next section we
  4. want to export a couple of environment variables in that shell such as
  5. PS1, PATH and others variables which are good to have set. For that
  6. purpose we'll create the $LFS/root/.bash_profile file which will be read
  7. by bash when we enter the chroot environment.</para>
  8. <para>Create a new file <filename>$LFS/root/.bash_profile</filename>
  9. by running the following.</para>
  10. <para><screen><userinput>cat &gt; $LFS/root/.bash_profile &lt;&lt; "EOF"</userinput>
  11. # Begin /root/.bash_profile
  12. PS1='\u:\w\$ '
  13. PATH=/bin:/usr/bin:/sbin:/usr/sbin
  14. export PS1 PATH
  15. # End /root/.bash_profile
  16. <userinput>EOF</userinput></screen></para>
  17. <para>The PS1 variable is an environment variable that controls the appearance
  18. of the command prompt. See the bash man page for details how this variable
  19. is constructed. Additional environment variables, aliases and so forth that are
  20. needed and/or wanted can be added at your own discretion.</para>
  21. </sect1>