bashprofile.xml 1.1 KB

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