bashprofile.xml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. The PS1 variable is an environment variable that controls the appearance of
  25. the command prompt. See the bash man page for details how this variable
  26. is constructed. Additional environment variables, aliases and so forth that are
  27. needed and/or wanted can be added at your own discretion.
  28. </para>
  29. </sect1>