bashprofile.xml 950 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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 a user wants to have set. For that
  7. purpose we'll
  8. create the $LFS/root/.bash_profile file which will be read by bash when we
  9. enter the chroot environment.
  10. </para>
  11. <para>
  12. Create a new file <filename>$LFS/root/.bash_profile</filename>
  13. by running the following.
  14. </para>
  15. <literallayout>
  16. <userinput>cat &gt; $LFS/root/.bash_profile &lt;&lt; "EOF"</userinput>
  17. # Begin /root/.bash_profile
  18. PS1='\u:\w\$ '
  19. PATH=/bin:/usr/bin:/sbin:/usr/sbin
  20. export PS1 PATH
  21. # End /root/.bash_profile
  22. <userinput>EOF</userinput>
  23. </literallayout>
  24. <para>
  25. More environment variables,aliases and whatever else is
  26. needed/wanted can be added at the users own discretion
  27. as he deems them necessary.
  28. </para>
  29. </sect1>