bashprofile.html
来自「lfs3.1 从源代码构建linux。html版本。」· HTML 代码 · 共 189 行
HTML
189 行
<HTML><HEAD><TITLE>Creating $LFS/root/.bash_profile</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.63"><LINKREL="HOME"TITLE="Linux From Scratch"HREF="../index.html"><LINKREL="UP"TITLE="Installing basic system software"HREF="../chapter06/chapter06.html"><LINKREL="PREVIOUS"TITLE="About debugging symbols"HREF="../chapter06/aboutdebug.html"><LINKREL="NEXT"TITLE="Entering the chroot'ed environment"HREF="../chapter06/chroot.html"></HEAD><BODYCLASS="sect1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">Linux From Scratch: Version 3.1</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="../chapter06/aboutdebug.html">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 6. Installing basic system software</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="../chapter06/chroot.html">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="sect1"><H1CLASS="sect1"><ANAME="ch06-bashprofile">6.3. Creating $LFS/root/.bash_profile</A></H1><P>When we have entered the chroot'ed environment in the next section wewant to export a couple of environment variables in that shell such asPS1, PATH and others variables which are good to have set. For thatpurpose we'll create the $LFS/root/.bash_profile file which will be read by bash when we enter the chroot environment.</P><P>Create a new file <TTCLASS="filename">$LFS/root/.bash_profile</TT>by running the following.</P><P><TABLEBORDER="0"BGCOLOR="#E0E0E0"WIDTH="100%"><TR><TD><FONTCOLOR="#000000"><PRECLASS="screen"><TTCLASS="userinput"><B>cat > $LFS/root/.bash_profile << "EOF"</B></TT># Begin /root/.bash_profilePS1='\u:\w\$ 'PATH=/bin:/usr/bin:/sbin:/usr/sbinexport PS1 PATH# End /root/.bash_profile<TTCLASS="userinput"><B>EOF</B></TT></PRE></FONT></TD></TR></TABLE></P><P>The PS1 variable is an environment variable that controls the appearance of the command prompt. See the bash man page for details how this variableis constructed. Additional environment variables, aliases and so forth that areneeded and/or wanted can be added at your own discretion.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLEWIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="../chapter06/aboutdebug.html">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../index.html">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="../chapter06/chroot.html">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">About debugging symbols</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="../chapter06/chapter06.html">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Entering the chroot'ed environment</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?