diff options
Diffstat (limited to 'chapter07/profile.xml')
-rw-r--r-- | chapter07/profile.xml | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/chapter07/profile.xml b/chapter07/profile.xml index c9f6e16a4..2ec314397 100644 --- a/chapter07/profile.xml +++ b/chapter07/profile.xml @@ -7,8 +7,10 @@ <title>The Bash Shell Startup Files</title> <?dbhtml filename="profile.html"?> -<para>The shell program <filename>/bin/bash</filename> (hereafter -referred to as just "the shell") uses a collection of startup files to +<indexterm zone="ch-scripts-profile"><primary sortas="e-/etc/profile">/etc/profile</primary></indexterm> + +<para>The shell program <command>/bin/bash</command> (hereafter +referred to as just <quote>the shell</quote>) uses a collection of startup files to help create an environment to run in. Each file has a specific use and may affect login and interactive environments differently. The files in the <filename class="directory">/etc</filename> directory generally provide global @@ -17,9 +19,9 @@ override the global settings. </para> <para>An interactive login shell is started after a successful login, using -<filename>/bin/login</filename>, by reading the +<command>/bin/login</command>, by reading the <filename>/etc/passwd</filename> file. An -interactive non-login shell is started at the command-line (e.g. +interactive non-login shell is started at the command-line (e.g., <prompt>[prompt]$</prompt><command>/bin/bash</command>). A non-interactive shell is usually present when a shell script is running. It is non-interactive because it is processing a script and not waiting for user input between @@ -35,31 +37,32 @@ as an interactive login shell.</para> <para>A base <filename>/etc/profile</filename> created below only sets some environment variables necessary for Bash to accept keystrokes properly, -even in non-English locale. Replace "ll" with the -two-letter code for your language (e.g. "en") and -"CC" with the two-letter code for your country -(e.g. "GB"). Also you may need to specify +even in non-English locale. Replace <replaceable>[ll]</replaceable> with the +two-letter code for your language (e.g., <quote>en</quote>) and +<replaceable>[CC]</replaceable> with the two-letter code for your country +(e.g., <quote>GB</quote>). Also you may need to specify (and this is actually the preferred form) your -character encoding (e.g. "iso8859-1") after a dot (so that the result -is "en_GB.iso8859-1"). +character encoding (e.g. <quote>iso8859-1</quote>) after a dot (so that the result +is <quote>en_GB.iso8859-1</quote>). Issue the following command for more information:</para> <screen><userinput>man 3 setlocale</userinput></screen> -<para>The list of all locales supported by glibc can be obtained by running +<para>The list of all locales supported by Glibc can be obtained by running the following command:</para> <screen><userinput>locale -a</userinput></screen> <para>Now, when you are sure about your locale settings, create the <filename>/etc/profile</filename> file:</para> + <screen><userinput>cat > /etc/profile << "EOF" # Begin /etc/profile # Written for Linux From Scratch # by Alexander E. Patrakov -export LC_ALL=ll_CC -export LANG=ll_CC +export LC_ALL=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable> +export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable> export INPUTRC=/etc/inputrc # End /etc/profile |