1 FreeFOAM Installation Instructions for Version 0.1.0
2 ====================================================
3 Michael Wild <themiwi@users.sourceforge.net>
8 http://freefoam.sourceforge.net
12 - Install the prerequisites documented in the link:README.html[README] file. If
13 your distribution does not have 'METIS', 'ParMetis', 'MGRIDGEN' or 'libccmio'
14 be not worried, FreeFOAM can handle those for you.
15 - Download the FreeFOAM source and unpack it somewhere convenient. For the
16 further instructions we will use +$HOME/Source/+.
18 ---------------------------------------------------------------------------
19 $ mkdir -p $HOME/Source
21 $ wget http://switch.dl.sourceforge.net/sourceforge/freefoam/freefoam-0.1.0rc2.tar.bz2
22 $ tar xjf freefoam-0.1.0rc2.tar.bz2
23 ---------------------------------------------------------------------------
24 - Create a build tree and _cd_ into it:
27 $ mkdir $HOME/Source/freefoam-0.1.0rc2-build
28 $ cd $HOME/Source/freefoam-0.1.0rc2-build
30 - Start CMake-configuration:
33 $ ccmake $HOME/Source/freefoam-0.1.0rc2
35 - Press the +c+ key. Use the arrow keys to navigate up and down and press
36 +enter+ to edit a field. To commit the change, press +enter+ again, or +ESC+
37 to abandon the change. ON/OFF fields are toggled by pressing +enter+.
38 Advanced options can be displayed by hitting the +t+ key.
39 * Set +CMAKE_BUILD_TYPE+ to 'Release' for an optimized build.
40 * If CMake complains that it can't find MPI, and you don't want to install it, disable
41 +FF_USE_MPI+. If, instead, you want to use GAMMA or PVM, enable +FF_USE_GAMMA+ or
42 +FF_USE_PVM+, respectively. You can also enable more than one of the options.
45 Currently only MPI implementation is available.
47 * Select the default Pstream implementation by setting +FF_DEFAULT_PSTREAM+
48 to one of 'dummy', 'mpi', 'pvm' or 'gamma'. This setting will only influence
49 the contents of the <<globalconfig,global 'controlDict' file>>.
50 * If CMake told you it couldn't find ParaView:
51 . Set +ParaView_DIR+ to the path of the directory containing
52 'ParaViewConfig.cmake', which is most likely the ParaView build directory.
53 . If you do not want to build the ParaView plug-ins, disable
54 +FF_BUILD_PARAVIEW_PLUGINS+
55 * If you do not have 'METIS' or 'ParMetis', enable
56 +FF_BUILD_PRIVATE_METIS+ or +FF_BUILD_PRIVATE_PARMETIS+, respectively.
57 CMake will then try to download and build the selected libraries for you.
58 Conversely, if one of the libraries is provided by your system, you can turn
59 the respective setting to 'OFF'. Please note that if your system provides
60 only 'ParMetis', you do not have to install 'METIS', as the former also
61 contains 'METIS' in an older version.
62 * If you want to use the 'MGridGen' agglomeration method for the GAMG solver,
63 you need to enable +FF_ENABLE_PARMGRIDGEN+ and if the library is not
64 installed on your system ensure that +FF_BUILD_PRIVATE_PARMGRIDGEN+ is
65 enabled. See <<parmgridgen,above>> regarding the unknown license status of
67 * In order to build 'ccm26ToFoam', a conversion utility for grids generated
68 with 'ProStar/ccm' (C) version 2.6, enable the setting +FF_ENABLE_CCMIO+
69 and if 'libccmio' is not installed on your system, also
70 +FF_BUILD_PRIVATE_CCMIO+. Refer to the <<libccmio,above>> description of
71 the 'libccmio' package for the license restrictions which apply to this
73 * If you plan on installing FreeFOAM, set +CMAKE_INSTALL_PREFIX+ to the base directory
74 under which FreeFOAM should reside.
75 * For more fine-grained control over what gets installed where, adjust
76 +FF_INSTALL_CONFIG_PATH+, +FF_INSTALL_HEADER_PATH+, +FF_INSTALL_LIB_PATH+,
77 +FF_INSTALL_FRAMEWORK_PATH+, +FF_INSTALL_PV3FOAMREADER_PATH+,
78 +FF_INSTALL_PVFOAMREADER_PATH+ and +FF_INSTALL_USERDFOAM_PATH+. Paths not
79 starting with a slash ('/') will be relative to 'CMAKE_INSTALL_PREFIX'. If
80 you include a leading slash, the paths are absolute.
81 * If you want FreeFOAM to use 'float' as the floating point type instead of
82 'double', change +FF_DOUBLE_PRECISION+ to 'OFF'.
83 - Hit the +c+ key again. If you enabled +FF_BUILD_PRIVATE_CCMIO+, CMake will fail
84 to download https://wci.llnl.gov/codes/visit/3rd_party/libccmio-2.6.1.tar.gz.
85 Please follow the instructions in the error message on how to work around this
86 problem, or download the file manually and place it in +ThirdParty/ccmio/+
87 (relative to the build directory). Then hit +c+ again.
88 - You shouldn't get any errors anymore now. Keep pressing +c+ until ccmake
89 displays "++Press [g] to generate and exit++" in the legend at the bottom of
91 - Press +g+ to generate the Makefiles and exit the ccmake interface.
92 - Start the native build tool. If you used the 'Makefile' generator
93 (which is the default for Unix-platforms), type
98 - If you have a multi-core/processor machine, you can speed things up
99 significantly by telling Make to run independent jobs in parallel.
100 A good choice for the number of parallel jobs to run is the
101 number of CPU's/cores you have in your machine plus 1 (to compensate
102 for disk-latency). For a typical dual-core machine, run
110 If you want to, you can now install FreeFOAM. Depending on the
111 +CMAKE_INSTALL_PREFIX+ and the individual +FF_INSTALL_*_PATH+ it is possible
112 that you have to do this as root, i.e. use +su+ or +sudo+.
119 If you didn't change +CMAKE_INSTALL_PREFIX+ and +FF_INSTALL_BIN_PATH+ chances
120 are that you can start using FreeFOAM right after you installed it without any
121 further steps being necessary.
124 Global Configuration Files
125 ~~~~~~~~~~~~~~~~~~~~~~~~~~
126 Unfortunately the OpenFOAM library (on which FreeFOAM builds) and some
127 applications require some files to be present for start-up. It finds those
128 in the following places (in the specified order, picking the first hit):
130 1. Under the directory specified in the +$FREEFOAM_CONFIG_DIR+ environment
132 2. In '$HOME/.FreeFOAM/0.1'
133 3. In '$HOME/.FreeFOAM'
134 4. In the installation directory of the configuration files. There are
135 two possible places for this:
137 '<CMAKE_INSTALL_PREFIX>/<FF_INSTALL_CONFIG_PATH>':: if you specified
138 +<FF_INSTALL_CONFIG_PATH>+ as a relative path.
139 '<FF_INSTALL_CONFIG_PATH>':: if you specified +<FF_INSTALL_CONFIG_PATH>+ as
142 The default location is '/usr/local/etc/FreeFOAM/0.1.0'.
144 Selecting the Parallel Communications Library
145 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146 Both, FreeFOAM and OpenFOAM abstract the parallel operations into the 'Pstream'
147 library, making it rather simple to firstly switch between parallel
148 implementations and secondly port the software to a new communications library.
149 However, FreeFOAM uses a much more flexible mechanism of determining which
150 'Pstream' implementation library to use than OpenFOAM. The latter does this by
151 adjusting the +LD_LIBRARY_PATH+ environment variable. As FreeFOAM wants to be a
152 well behaved Linux citizen, this is not an option. Instead, FreeFOAM dynamically
153 loads the desired 'Pstream' library at startup (i.e. as a plug-in). The
154 following list details how FreeFOAM determines what library to load (if at all):
156 1. If the environment variable +FREEFOAM_PSTREAM_LIBRARY+ is set,
157 FreeFOAM will try to load the library specified by it.
158 2. If the sub-dictionary +PstreamImplementation+ exists in the global
159 'controlDict' file (see <<globalconfig,'Global Configuration Files'>>), it
160 reads the value of the entry +configName+ therein. It then expects that a
161 sub-dictionary of +PstreamImplementation+ with the name specified in
162 +configName+ exists. If that sub-dictionary contains the entry +library+, it
163 will try to load a library specified by the value of that entry.
165 After FreeFOAM (possibly) loaded the library, it will try to instantiate
166 concrete implementations of the abstract base classes +PstreamImpl+,
167 +IPstreamImpl+ and +OPstreamImpl+. Which classes are to be instantiated
168 is determined as follows:
170 1. FreeFOAM queries the environment variables +FREEFOAM_PSTREAM_CLASS+,
171 +FREEFOAM_IPSTREAM_CLASS+ and +FREEFOAM_OPSTREAM_CLASS+ for the class
172 names to be instantiated.
173 2. For any of the variables not set, it requires the sub-dictionary
174 +PstreamImplementation+ to be present in the global 'controlDict', reads the
175 value of +configName+ and similarly to the library loading, loads the
176 sub-dictionary specified by that value. It then expects to find the entries
177 +Pstream+, +IPstream+ and +OPstream+ which specify the names of the classes
180 This means that one can create a global 'controlDict' file containing
181 (among other things) something like the following:
184 PstreamImplementation
191 library libdummyPstream.so;
192 Pstream dummyPstreamImpl;
193 OPstream dummyOPstreamImpl;
194 IPstream dummyIPstreamImpl;
199 library libmpiPstream.so;
200 Pstream mpiPstreamImpl;
201 OPstream mpiOPstreamImpl;
202 IPstream mpiIPstreamImpl;
208 This way the administrator can provide a global 'controlDict' in the FreeFOAM
209 installation. Every user can then override that 'controlDict' by supplying her
210 own file in her home directory as detailed in <<globalconfig,'Global
211 Configuration Files'>>. In order to select a particular 'Pstream' implementation
212 for a specific communications library, the user can then either adjust the
213 +PstreamImplementation::configName+ entry in the global 'controlDict' file, set
214 the +FREEFOAM_PSTREAM_CONFIG+ variable or for full control, set the variables
215 +FREEFOAM_PSTREAM_LIBRARY+, +FREEFOAM_PSTREAM_CLASS+, +FREEFOAM_IPSTREAM_CLASS+
216 and +FREEFOAM_OPSTREAM_CLASS+.
218 Running FreeFOAM From the Build Tree
219 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
220 You can use FreeFOAM without installing it first, directly from the build tree.
221 However, this might take a little bit more effort to set up because most likely
222 you will have to adjust the following environment variables:
224 PATH:: Must contain '$HOME/Source/freefoam-0.1.0rc2-build/bin'
225 LD_LIBRARY_PATH:: Must contain '$HOME/Source/freefoam-0.1.0rc2-build/lib/FreeFOAM-0.1.0'
226 FREEFOAM_CONFIG_DIR:: Should point to '$HOME/Source/freefoam-0.1.0rc2-build/etc'
228 Where it is assumed that you followed the <<installation,installation instructions>>. If
229 you used different paths for downloading and compiling FreeFOAM, you will have
230 to adjust these names. Refer to <<environment,'Extending Search Paths And
231 Setting Environment Variables Permanently'>> if you need help setting these
234 Running the tutorials
235 ---------------------
236 Now you should be able to run the tutorial cases. For this copy the +tutorials+
237 directory to some convenient place:
239 $ mkdir -p $HOME/FreeFOAM/$LOGNAME-0.1/run
240 $ cp -r $HOME/Source/freefoam-0.1.0rc2-build/tutorials $HOME/FreeFOAM/$LOGNAME-0.1/run/
241 $ cd $HOME/FreeFOAM/$LOGNAME-0.1/run
243 And try to run e.g. the 'cavity' tutorial case:
246 $ blockMesh -case cavity
247 $ checkMesh -case cavity
248 $ icoFoam -case cavity
250 Things should run smoothly and finish without an error.
252 Obtaining the Source Code from the GIT repository
253 -------------------------------------------------
254 - Clone the FreeFOAM repository (here the clone is placed in
255 +$HOME/Source/FreeFOAM+):
257 ---------------------------------------------------------------------------
258 $ mkdir -p $HOME/Source
259 $ git clone git://repo.or.cz/freefoam.git $HOME/Source/FreeFOAM
260 ---------------------------------------------------------------------------
261 - Proceed in the same way (replacing the path names apropriately) as in the
262 above build instructions.
264 Build Configuration Reference
265 -----------------------------
268 One of '<empty>', 'Debug', 'Release', 'RelWithDebInfo' and 'MinSizeRel'.
269 Refer to the CMake documentation for more detail.
270 +FF_DOUBLE_PRECISION+::
271 If set to 'ON' FreeFOAM will be compiled using 'double' as the
272 floating point type. If set to 'OFF' it will use 'float'.
273 +FF_BUILD_FRAMEWORK+::
274 If this is enabled, the libraries are built as frameworks. Only available on Mac OS X.
275 +CMAKE_INSTALL_PREFIX+::
276 Installation prefix under which to install FreeFOAM.
277 +FF_INSTALL_BIN_PATH+::
278 Installation path of the binaries. If not absolute, it is relative to
279 'CMAKE_INSTALL_PREFIX'.
280 +FF_INSTALL_CONFIG_PATH+::
281 Installation path of the configuration files. If not absolute, it is
282 relative to 'CMAKE_INSTALL_PREFIX'.
283 +FF_INSTALL_HEADER_PATH+::
284 Installation path of the header files. If not absolute, it is
285 relative to 'CMAKE_INSTALL_PREFIX'. On Mac OS X, and if
286 'FF_BUILD_FRAMEWORK' is enabled, this setting is ignored.
287 +FF_INSTALL_LIB_PATH+::
288 Installation path of the libraries. If not absolute, it is
289 relative to 'CMAKE_INSTALL_PREFIX'.
290 +FF_INSTALL_FRAMEWORK_PATH+::
291 Installation path of the Mac OS X frameworks. If not absolute, it is
292 relative to 'CMAKE_INSTALL_PREFIX'. This is only available and takes
293 effect if FreeFOAM is compiled on Mac OS X, and if
294 'FF_BUILD_FRAMEWORK' is enabled.
295 +FF_INSTALL_PV3FOAMREADER_PATH+::
296 Installation path of the ParaView3 plug-ins. If not absolute, it is
297 relative to 'CMAKE_INSTALL_PREFIX'.
298 +FF_INSTALL_PVFOAMREADER_PATH+::
299 Installation path of the ParaView2 plug-ins. If not absolute, it is
300 relative to 'CMAKE_INSTALL_PREFIX'.
301 +FF_INSTALL_USERDFOAM_PATH+::
302 Installation path of the Ensight plug-in. If not absolute, it is
303 relative to 'CMAKE_INSTALL_PREFIX'.
304 +EXECUTABLE_PREFIX+::
305 Prefix which get prepended to the name of the executables. This defaults to
306 'ff_' and serves the disambiguation of names.
308 If enabled, FreeFOAM will use the GAMMA parallel communications library.
310 If enabled, FreeFOAM will use the MPI parallel communications library.
311 This is required in order to build some of the libraries and utilities.
313 If enabled, FreeFOAM will use the PVM parallel communications library.
314 +FF_DEFAULT_PSTREAM+::
315 The default Pstream selection in the global 'controlDict' file.
316 +FF_BUILD_PARAVIEW_PLUGINS+::
317 Whether to build the ParaView plug-ins. If enabled, FreeFOAM requires a
318 ParaView build tree and the 'ParaView_DIR' variable set to the path of it.
321 Enable the use of 'libccmio'. This is required to build the grid conversion
322 utility 'ccm26ToFoam'.
325 The license of 'libccmio' (C) is proprietary and requires the consent of the
326 copyright holders (http://www.cd-adapco.com[CD-adapco]) to download and use the
327 library. Further it is not allowed to redistribute it in any form. The request
328 for permission of inclusion with http://debian.org[Debian] was answered as
329 follows by mailto:geoffrey.prewett@us.cd-adapco.com[Geoffrey Prewett]:
331 --------------------------------------------------------------------------------
334 Sorry for the delay in response. I checked back with our development director,
335 and he felt that it would be best to not include libccmio with Debian.
336 Instead, we would prefer to continue our current policy and keep it on our
337 web/FTP and have people ask for it. There are three reasons for this:
339 1) We don't support STAR on Debian, and don't want to give the impression that we do.
340 2) We would like to keep a list of people that we give the library to.
341 3) This is not a general purpose library; its sole purpose is to communicate
342 between our products. Accepting outside changes risks committing a change that
343 would break our own software in possibly subtle ways.
345 So I regret to tell you that my company has declined to permit libccmio to be
346 distributed as part of Debian.
350 --------------------------------------------------------------------------------
352 +FF_BUILD_PRIVATE_CCMIO+::
353 Automatically download and build libccmio. Unfortunately this process will
354 fail in the download step, since CMake currently does not support 'https'
355 URLs. But you will get specific instructions from the build system on how to
356 get around this problem.
357 +FF_BUILD_PRIVATE_METIS+::
358 Automatically download and build 'METIS'.
359 +FF_BUILD_PRIVATE_PARMETIS+::
360 Automatically download and build 'ParMetis'.
361 [[enable-parmgridgen]]
362 +FF_ENABLE_PARMGRIDGEN+::
363 Enable the use of 'PARMGRIDGEN' and 'MGRIDGEN' which is required to build
364 'MGridGenGamgAgglomeration' providing the 'MGridGen' agglomeration method for
368 The license of 'MGRIDGEN' and 'PARMGRIDGEN' is unknown and the upstream authors
369 so far have not answered any inquiries to resolve the issue. If you enable the
370 use of 'MGRIDGEN' and 'PARMGRIDGEN' you alone are responsible for ensuring that
371 you don't violate any license conditions applying to these libraries. The
372 authors of FreeFOAM will and cannot take any responsibility for your
375 +FF_BUILD_PRIVATE_PARMGRIDGEN+::
376 Automatically download and build 'PARMGRIDGEN' and 'MGRIDGEN'.
377 +FF_BUILD_DOXYGEN_DOCS+::
378 Enable building of the 'Doxygen API documentation'. The documentation will
379 only be built once and is not updated automatically. This is because it
380 depends on a huge number of files and would make dependency tracking very
381 slow and difficult to maintain. To force the re-generation of the API
382 documentation execute +make apidoc+.
387 The FreeFOAM Executables Are Not Found By The Shell
388 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
389 There are three possible reasons for this:
391 1. Your shell (notably 'csh', 'tcsh' and 'zsh') requires you to refresh the
392 cache of available executables. You can do so by entering the command:
398 2. If 'rehashing' didn't solve the problem, the problem most likely is that you
399 installed FreeFOAM into a non-standard location by changing the configuration
400 variables +CMAKE_INSTALL_PREFIX+ or +FF_INSTALL_BIN_PATH+ in which case the
401 executables where installed into a directory not searched by the shell. In
402 this case you have to add the installation directory of the executables to
403 the +PATH+ variable. There are two possible locations:
406 '<CMAKE_INSTALL_PREFIX>/<FF_INSTALL_BIN_PATH>':: if you specified
407 +FF_INSTALL_BIN_PATH+ as a relative path
408 '<FF_INSTALL_BIN_PATH>':: if you specified +FF_INSTALL_BIN_PATH+ as an absolute
412 After extending the +PATH+ variable with the installation directory of the
413 executables, you should be able to run all FreeFOAM applications as any other
414 binary available on the system. See <<environment,'Extending Search Paths And
415 Setting Environment Variables Permanently'>> for
416 instructions on how to extend the search path.
418 3. This option is similar to the previous solution and applies if you want to
419 run FreeFOAM from the build tree (i.e. without running +make install+). In
420 this case you again have to make sure that your shell finds the executables
421 built by CMake by extending the +PATH+ variable. Further, you have to tell
422 FreeFOAM where to find the global configuration files (see
423 <<globalconfig,'Global Configuration Files'>>). Here, you have the option to
424 place the files under your home directory or set an environment variable. The
425 former can be achieved by:
428 $ mkdir -p $HOME/.FreeFOAM/0.1
429 $ cp $HOME/Source/freefoam-0.1.0rc2-build/etc/controlDict $HOME/.FreeFOAM/0.1
430 $ cp $HOME/Source/freefoam-0.1.0rc2-build/etc/cellModels $HOME/.FreeFOAM/0.1
431 $ cp -r $HOME/Source/freefoam-0.1.0rc2-build/etc/thermoData $HOME/.FreeFOAM/0.1
434 The latter (and recommended) method is to set the environment variable
435 +FREEFOAM_CONFIG_DIR+ to '$HOME/Source/freefoam-0.1.0rc2-build/etc'. Adjust paths to the
436 build tree to your actual setup.
438 Starting Any FreeFOAM Application Fails Because Some Libraries Cannot Be Found
439 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
440 Although CMake should have taken care of this by using +RPATH+ on Linux and
441 +install_name+ on Mac OS X, it might be necessary on some systems to adjust the
442 library search paths:
444 +LD_LIBRARY_PATH+:: This variable is used by all Unix like systems (e.g. Linux,
446 +DYLD_LIBRARY_PATH+:: This variable is used by Mac OS X.
448 If you installed FreeFOAM, there are (as with the executables), two possible
449 installation directories:
451 '<CMAKE_INSTALL_PREFIX>/<FF_INSTALL_LIB_PATH>':: if you specified
452 +FF_INSTALL_LIB_PATH+ as a relative path.
453 '<FF_INSTALL_LIB_PATH>':: if you specified +FF_INSTALL_LIB_PATH+ as an absolute
456 If you are trying to run from the build tree, you have to include
457 '$HOME/Source/freefoam-0.1.0rc2-build/lib/FreeFOAM-0.1.0' in the above mentioned search
458 paths (where you have to adjust the location of the build tree to your actual
461 A Running FreeFOAM Application Aborts Because It Can't 'dlopen' A Library
462 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
463 FreeFOAM (and OpenFOAM) often dynamically load libraries at run-time (a.k.a
464 plug-ins) to add features the user requested without requiring that the whole
465 application be recompiled. This makes it very simple to add new boundary
466 conditions, turbulence and combustion models etc. However, it also requires that
467 FreeFOAM must be able to find these libraries at run-time. The operating system
468 function which does the loading of the libraries ('dlopen') usually tries to
469 find the library with the given name in several places; namely a default search
470 path and a search path configured by one or multiple environment variables such
471 as +LD_LIBRARY_PATH+ or +DYLD_LIBRARY_PATH+ (on Mac OS X). The details vary from
472 platform to platform, so you best consult the documentation of 'dlopen' for the
475 Additionally FreeFOAM allows you to configure a custom search path for plug-ins
476 in the <<globalconfig,global 'controlDict'>> file by listing the directories to
477 be searched in the list +LibrarySearchPaths+. By default FreeFOAM is configured
478 to search for plug-ins in the location where CMake installed them.
480 If you want to add your own plug-in libraries (e.g. you want to add your own
481 boundary conditions class), you most probably will want to extend this search
485 Extending Search Paths And Setting Environment Variables Permanently
486 --------------------------------------------------------------------
487 The way one sets environment variables and extends the executable and library
488 search paths permanently strongly depends on the shell used. Usually one has to
489 create or change an initialization file in the users home directory. In the
490 following this will be discussed very briefly for the popular shells 'BASH' and
491 'tcsh'. However, if you need more help or want information on using the shell,
492 there is an excellent tutorial available at http://linuxcommand.org.
496 The BASH shell is the default shell for most Linux/Unix distributions. Most
497 systems configure the BASH shell such that it reads the text file
498 '$HOME/.bashrc' when starting up, so this is the place where one appends
499 customizations of the environment variables. On some systems this file is not
500 processed by default (notably Mac OS X). In this case you can use
501 '$HOME/.bash_profile'.
503 Referencing A Variable
504 ^^^^^^^^^^^^^^^^^^^^^^
505 To retrieve the value stored in a shell variable or environment variable, one
506 prefixes its name with the dollar (+$+) character.
510 The syntax for setting a variable and making it available to child-processes of
511 the shell is the following:
513 $ export variable_name=variable_value
515 Note that no white-space characters are allowed surrounding the +=+ sign.
517 Extending A Search Path
518 ^^^^^^^^^^^^^^^^^^^^^^^
519 The shell and other Unix system facilities use environment variables to locate
520 executables and dynamically linked libraries. These search paths consist of
521 strings naming directories in which the executables and libraries should be
522 searched for. The individual paths are separated by a colon (+:+) character. To
523 add the e.g. the directory '$HOME/bin' to the search path for executables, one
524 would do the following:
526 $ export PATH=$PATH:$HOME/bin
528 which appends '$HOME/bin' to the end of the +PATH+ variable.
532 Some users and administrators prefer to use a 'C-Shell', such as the TCSH. Here
533 you can use e.g. the file '$HOME/.tcshrc' to customize the environment.
535 Referencing A Variable
536 ^^^^^^^^^^^^^^^^^^^^^^
537 As with the BASH, one retrieves the value stored in a shell variable or
538 environment variable by prefixing its name with the dollar (+$+) character.
539 Sometimes it is also necessary to protect the variable name by surrounding it
540 with curly braces (+{+ and +}+).
544 The syntax for setting a variable and making it available to child-processes of
545 the shell is the following:
547 $ setenv variable_name variable_value
550 Extending A Search Path
551 ^^^^^^^^^^^^^^^^^^^^^^^
552 The shell and other Unix system facilities use environment variables to locate
553 executables and dynamically linked libraries. These search paths consist of
554 strings naming directories in which the executables and libraries should be
555 searched for. The individual paths are separated by a colon (+:+) character. To
556 add the e.g. the directory '$HOME/bin' to the search path for executables, one
557 would do the following:
559 $ setenv PATH ${PATH}:${HOME}/bin
561 which appends '$HOME/bin' to the end of the +PATH+ variable. Note that
562 'C-shells' usually require the user to type 'rehash' after changing the +PATH+
563 variable to update the cache of available programs.
565 ////////////////////////////////////////////////////////
566 Process with: asciidoc -a toc INSTALL
568 Vim users, this is for you:
569 vim: ft=asciidoc sw=2 expandtab fenc=utf-8
570 ////////////////////////////////////////////////////////