/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-variables.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-variables.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.22 Revision 1.23
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-variables.xml,v 1.22 2007/05/19 04:13:46 nightmorph Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-variables.xml,v 1.23 2012/06/29 15:41:54 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract> 11<abstract>
12With Gentoo you can easily manage the environment variables for your system. 12With Gentoo you can easily manage the environment variables for your system.
13This chapter explains how you do that, and also describes frequently used 13This chapter explains how you do that, and also describes frequently used
14variables. 14variables.
15</abstract> 15</abstract>
16 16
17<version>1.16</version> 17<version>2</version>
18<date>2007-05-18</date> 18<date>2012-06-29</date>
19 19
20<section> 20<section>
21<title>Environment Variables?</title> 21<title>Environment Variables?</title>
22<subsection> 22<subsection>
23<title>What they are</title> 23<title>What they are</title>
24<body> 24<body>
25 25
26<p> 26<p>
27An environment variable is a named object that contains information used by one 27An environment variable is a named object that contains information used by one
28or more applications. Many users (and especially those new to Linux) find this 28or more applications. Many users (and especially those new to Linux) find this
29a bit weird or unmanageable. However, this is a mistake: by using environment 29a bit weird or unmanageable. However, this is a mistake: by using environment
30variables one can easily change a configuration setting for one or more 30variables one can easily change a configuration setting for one or more
31applications. 31applications.
32</p> 32</p>
33 33
219 219
220<p> 220<p>
221The <c>env-update</c> script will append the values in the alphabetical order 221The <c>env-update</c> script will append the values in the alphabetical order
222of the <path>/etc/env.d</path> files. The file names must begin with two 222of the <path>/etc/env.d</path> files. The file names must begin with two
223decimal digits. 223decimal digits.
224</p> 224</p>
225 225
226<pre caption="Update order used by env-update"> 226<pre caption="Update order used by env-update">
227 00basic 99kde-env 99local 227 00basic 99kde-env 99local
228 +-------------+----------------+-------------+ 228 +-------------+----------------+-------------+
229PATH="/bin:/usr/bin:/usr/kde/3.2/bin:/usr/local/bin" 229PATH="/bin:/usr/bin:/usr/kde/3.2/bin:/usr/local/bin"
230</pre> 230</pre>
231 231
232<p> 232<p>
233The concatenation of variables does not always happen, only with the following 233The concatenation of variables does not always happen, only with the following
234variables: <c>ADA_INCLUDE_PATH</c>, <c>ADA_OBJECTS_PATH</c>, <c>CLASSPATH</c>,
234variables: <c>KDEDIRS</c>, <c>PATH</c>, <c>LDPATH</c>, <c>MANPATH</c>, 235<c>KDEDIRS</c>, <c>PATH</c>, <c>LDPATH</c>, <c>MANPATH</c>,
235<c>INFODIR</c>, <c>INFOPATH</c>, <c>ROOTPATH</c>, <c>CONFIG_PROTECT</c>, 236<c>INFODIR</c>, <c>INFOPATH</c>, <c>ROOTPATH</c>, <c>CONFIG_PROTECT</c>,
236<c>CONFIG_PROTECT_MASK</c>, <c>PRELINK_PATH</c> and <c>PRELINK_PATH_MASK</c>. 237<c>CONFIG_PROTECT_MASK</c>, <c>PRELINK_PATH</c>, <c>PRELINK_PATH_MASK</c>,
238<c>PKG_CONFIG_PATH</c> and <c>PYTHONPATH</c>.
237For all other variables the latest defined value (in alphabetical order of the 239For all other variables the latest defined value (in alphabetical order of the
238files in <path>/etc/env.d</path>) is used. 240files in <path>/etc/env.d</path>) is used.
241</p>
242
243<p>
244You can add more variables into this list of concatenate-variables by adding the
245variable name to either <c>COLON_SEPARATED</c> or <c>SPACE_SEPARATED</c>
246variables (also inside an env.d file).
239</p> 247</p>
240 248
241<p> 249<p>
242When you run <c>env-update</c>, the script will create all environment variables 250When you run <c>env-update</c>, the script will create all environment variables
243and place them in <path>/etc/profile.env</path> (which is used by 251and place them in <path>/etc/profile.env</path> (which is used by
244<path>/etc/profile</path>). It will also extract the information from the 252<path>/etc/profile</path>). It will also extract the information from the
245<c>LDPATH</c> variable and use that to create <path>/etc/ld.so.conf</path>. 253<c>LDPATH</c> variable and use that to create <path>/etc/ld.so.conf</path>.
246After this, it will run <c>ldconfig</c> to recreate the 254After this, it will run <c>ldconfig</c> to recreate the
247<path>/etc/ld.so.cache</path> file used by the dynamical linker. 255<path>/etc/ld.so.cache</path> file used by the dynamical linker.
248</p> 256</p>
249 257
250<p> 258<p>
251If you want to notice the effect of <c>env-update</c> immediately after you run 259If you want to notice the effect of <c>env-update</c> immediately after you run
252it, execute the following command to update your environment. Users who have 260it, execute the following command to update your environment. Users who have
253installed Gentoo themselves will probably remember this from the installation 261installed Gentoo themselves will probably remember this from the installation

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20