📄 settingenvironment.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 7.13. Setting Up the Environment </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-x86"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86 </h4> <h3> Chapter 7. If You Are Going to Boot </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="grub-build.html" title="GRUB-0.97">Prev</a> <p> GRUB-0.97 </p> </li> <li class="next"> <a accesskey="n" href="fstab.html" title= "Creating the ${LFS}/etc/fstab File">Next</a> <p> Creating the ${LFS}/etc/fstab File </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86"> Home</a> </li> </ul> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 7.13. Setting Up the Environment </h1> </div> <p> The new instance of the shell that will start when the system is booted is a <span class="emphasis"><em>login</em></span> shell, which will read <tt class="filename">.bash_profile</tt> file. Create the <tt class="filename">.bash_profile</tt> file now: </p> <pre class="userinput"><kbd class="command">cat > ${LFS}/root/.bash_profile << "EOF"<tt class="literal">set +hPS1='\u:\w\$ 'LC_ALL=POSIXPATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin:/tools/sbinexport LC_ALL PATH PS1</tt>EOF</kbd></pre> <p> The <tt class="envar">LC_ALL</tt> variable controls the localization of certain programs, making their messages follow the conventions of a specified country. Setting <tt class="envar">LC_ALL</tt> to “<span class="quote">POSIX</span>” or “<span class= "quote">C</span>” (the two are equivalent) ensures that everything will work as expected on your temporary system. </p> <p> By putting <tt class="filename">/tools/bin</tt> at the end of the standard <tt class="envar">PATH</tt>, all the programs installed in <a href="../temp-system/chapter.html">Constructing a Temporary System</a> are only picked up by the shell if they have not yet been built on the target system. This configuration forces use of the final system binaries as they are built over the temp-system, minimising the chance of final system programs being built against the temp-system. </p> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="grub-build.html" title="GRUB-0.97">Prev</a> <p> GRUB-0.97 </p> </li> <li class="next"> <a accesskey="n" href="fstab.html" title= "Creating the ${LFS}/etc/fstab File">Next</a> <p> Creating the ${LFS}/etc/fstab File </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 7. If You Are Going to Boot">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-x86"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -