bashprofile.xml 932 B

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