source: postlfs/config/profile.xml@ 2753b70b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2753b70b was 2753b70b, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Tagged profile.xml

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4176 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="postlfs-config-profile" xreflabel="The Bash Shell Startup Files">
9 <?dbhtml filename="profile.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>The Bash Shell Startup Files</title>
17
18 <para>The shell program <filename>/bin/bash</filename> (hereafter
19 referred to as just "the shell") uses a collection of startup files to
20 help create an environment. Each file has a specific use and
21 may affect login and interactive environments differently. The files in
22 the <filename class="directory">/etc</filename> directory generally provide
23 global settings. If an equivalent file exists in your home directory it may
24 override the global settings.</para>
25
26 <para>An interactive login shell is started after a successful login, using
27 <filename>/bin/login</filename>, by reading the <filename>/etc/passwd</filename>
28 file. This shell invocation normally reads <filename>/etc/profile</filename>
29 and its private equivalent <filename>~/.bash_profile</filename> upon
30 startup.</para>
31
32 <para>An interactive non-login shell is normally started at the command-line
33 (e.g., <prompt>[prompt]$</prompt><command>/bin/bash</command>) or by the
34 <command>/bin/su</command> command. An interactive non-login shell is also
35 started with a terminal program such as <command>xterm</command> or
36 <command>konsole</command> from within a graphical environment. This type of
37 shell invocation normally copies the parent environment and then reads the
38 user's <filename>~/.bashrc</filename> file for additional startup configuration
39 instructions.</para>
40
41 <para>A non-interactive shell is usually present when a shell script is
42 running. It is non-interactive because it is processing a script and not
43 waiting for user input between commands. For these shell invocations, only
44 the environment inherited from the parent shell is used.</para>
45
46 <para> The file <filename>~/.bash_logout</filename> is not used for an
47 invocation of the shell. It is read and executed when a user exits from an
48 interactive login shell.</para>
49
50 <para>To the standard files, <filename>/etc/bashrc</filename> is called from
51 the user's <filename>~/.bashrc</filename> for system wide initialization of
52 non-login shells.</para>
53
54 <para>For more information see <command>info bash</command> --
55 <emphasis role="strong">Nodes: Bash Startup Files and Interactive
56 Shells.</emphasis></para>
57
58 <sect2 id="etc-profile-profile">
59 <title>/etc/profile</title>
60
61 <indexterm zone="postlfs-config-profile etc-profile-profile">
62 <primary sortas="e-etc-profile">/etc/profile</primary>
63 </indexterm>
64
65 <para>Here is a base <filename>/etc/profile</filename>. This file starts by
66 setting up some helper functions and some basic parameters. It specifies some
67 <filename>bash</filename> history parameters and, for security purposes,
68 disables keeping a permanent history file for the <systemitem
69 class="username">root</systemitem> user. It also sets a
70 default user prompt. It then calls small, single purpose scripts in the
71 <filename class='directory'>/etc/profile.d</filename> directory to provide most
72 initialization. </para>
73
74 <para>For more information on the escape sequences you can use for your prompt
75 (e.g., the <envar>PS1</envar> environment variable) see <command>info
76 bash</command> -- <emphasis role="strong">Node: Printing a
77 Prompt.</emphasis></para>
78
79<screen role="root"><userinput>cat &gt; /etc/profile &lt;&lt; "EOF"
80<literal># Begin /etc/profile
81# Written for Beyond Linux From Scratch
82# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
83# modifications by Dagmar d'Surreal &lt;rivyqntzne@pbzpnfg.arg&gt;
84
85# System wide environment variables and startup programs.
86
87# System wide aliases and functions should go in /etc/bashrc. Personal
88# environment variables and startup programs should go into
89# ~/.bash_profile. Personal aliases and functions should go into
90# ~/.bashrc.
91
92# Functions to help us manage paths. Second argument is the name of the
93# path variable to be modified (default: PATH)
94pathremove () {
95 local IFS=':'
96 local NEWPATH
97 local DIR
98 local PATHVARIABLE=${2:-PATH}
99 for DIR in ${!PATHVARIABLE} ; do
100 if [ "$DIR" != "$1" ] ; then
101 NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
102 fi
103 done
104 export $PATHVARIABLE="$NEWPATH"
105}
106
107pathprepend () {
108 pathremove $1 $2
109 local PATHVARIABLE=${2:-PATH}
110 export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
111}
112
113pathappend () {
114 pathremove $1 $2
115 local PATHVARIABLE=${2:-PATH}
116 export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
117}
118
119
120# Set the initial path
121export PATH=/bin:/usr/bin
122
123if [ $EUID -eq 0 ] ; then
124 pathappend /sbin:/usr/sbin
125 unset HISTFILE
126fi
127
128# Setup some environment variables.
129export HISTSIZE=1000
130export HISTIGNORE="&amp;:[bf]g:exit"
131#export PS1="[\u@\h \w]\\$ "
132export PS1='\u@\h:\w\$ '
133
134for script in /etc/profile.d/*.sh ; do
135 if [ -r $script ] ; then
136 . $script
137 fi
138done
139
140# Now to clean up
141unset pathremove pathprepend pathappend
142
143# End /etc/profile</literal>
144EOF</userinput></screen>
145
146 <sect3 id="etc-profile.d">
147 <title>The /etc/profile.d Directory</title>
148
149 <indexterm zone="postlfs-config-profile etc-profile.d">
150 <primary sortas="e-etc-profile.d">/etc/profile.d</primary>
151 </indexterm>
152
153 <para>Now create the <filename class='directory'>/etc/profile.d</filename>
154 directory, where the individual initialization scripts are placed.</para>
155
156<screen role="root"><userinput>install --directory --mode=0755 --owner=root --group=root /etc/profile.d</userinput></screen>
157
158 </sect3>
159
160 <sect3 id="etc-profile.d-dircolors.sh">
161 <title>/etc/profile.d/dircolors.sh</title>
162
163 <indexterm zone="postlfs-config-profile etc-profile.d-dircolors.sh">
164 <primary sortas="e-etc-profile.d-dircolors.sh">/etc/profile.d/dircolors.sh</primary>
165 </indexterm>
166
167 <para>This script uses the <filename>~/.dircolors</filename> and
168 <filename>/etc/dircolors</filename> files to control the colors of file names in a
169 directory listing. They control colorized output of things like <command>ls
170 --color</command>. The explaination of how to initialize these files is at the
171 end of this section.</para>
172
173<screen role="root"><userinput>cat &gt; /etc/profile.d/dircolors.sh &lt;&lt; "EOF"
174<literal># Setup for /bin/ls to support color, the alias is in /etc/bashrc.
175if [ -f "/etc/dircolors" ] ; then
176 eval $(dircolors -b /etc/dircolors)
177
178 if [ -f "$HOME/.dircolors" ] ; then
179 eval $(dircolors -b $HOME/.dircolors)
180 fi
181fi
182alias ls='ls --color=auto'</literal>
183EOF</userinput></screen>
184
185 </sect3>
186
187 <sect3 id="extrapaths.sh">
188 <title>/etc/profile.d/extrapaths.sh</title>
189
190 <indexterm zone="postlfs-config-profile extrapaths.sh">
191 <primary sortas="e-etc-profile.d-extrapaths.sh">/etc/profile.d/extrapaths.sh</primary>
192 </indexterm>
193
194 <para>This script adds several useful paths to the <envar>PATH</envar> and
195 <envar>PKG_CONFIG_PATH</envar> environment variables. If you want, you
196 can uncomment the last section to put a dot at the end of your path. This will
197 allow executables in the current working directory to be executed without
198 specifiying a ./, however you are warned that this is generally considered a
199 security hazard.</para>
200
201<screen role="root"><userinput>cat &gt; /etc/profile.d/extrapaths.sh &lt;&lt; "EOF"
202<literal>if [ -d /usr/local/lib/pkgconfig ] ; then
203 pathappend /usr/local/lib/pkgconfig PKG_CONFIG_PATH
204fi
205if [ -d /usr/local/bin ]; then
206 pathprepend /usr/local/bin
207fi
208if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
209 pathprepend /usr/local/sbin
210fi
211for directory in $(find /opt/*/lib/pkgconfig -type d 2>/dev/null); do
212 pathappend $directory PKG_CONFIG_PATH
213done
214for directory in $(find /opt/*/bin -type d 2>/dev/null); do
215 pathappend $directory
216done
217if [ -d ~/bin ]; then
218 pathprepend ~/bin
219fi
220#if [ $EUID -gt 99 ]; then
221# pathappend .
222#fi</literal>
223EOF</userinput></screen>
224
225 </sect3>
226
227 <sect3 id="readline.sh">
228 <title>/etc/profile.d/readline.sh</title>
229
230 <indexterm zone="postlfs-config-profile readline.sh">
231 <primary sortas="e-etc-profile.d-readline.sh">/etc/profile.d/readline.sh</primary>
232 </indexterm>
233
234 <para>This script sets up the default <filename>inputrc</filename>
235 configuration file. If the user does not have individual settings, it uses the
236 global file.</para>
237
238<screen role="root"><userinput>cat &gt; /etc/profile.d/readline.sh &lt;&lt; "EOF"
239<literal># Setup the INPUTRC environment variable.
240if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
241 INPUTRC=/etc/inputrc
242fi
243export INPUTRC</literal>
244EOF</userinput></screen>
245
246 </sect3>
247
248 <sect3 id="tinker-term.sh">
249 <title>/etc/profile.d/tinker-term.sh</title>
250
251 <indexterm zone="postlfs-config-profile tinker-term.sh">
252 <primary sortas="e-etc-profile.d-tinker-term.sh">/etc/profile.d/tinker-term.sh</primary>
253 </indexterm>
254
255 <para>Some applications need a specific <envar>TERM</envar> setting to
256 support color.</para>
257
258<screen role="root"><userinput>cat &gt; /etc/profile.d/tinker-term.sh &lt;&lt; "EOF"
259<literal># This will tinker with the value of TERM in order to convince certain
260# apps that we can, indeed, display color in their window.
261
262if [ -n "$COLORTERM" ]; then
263 export TERM=xterm-color
264fi
265
266if [ "$TERM" = "xterm" ]; then
267 export TERM=xterm-color
268fi</literal>
269EOF</userinput></screen>
270
271 </sect3>
272
273 <sect3 id="umask.sh">
274 <title>/etc/profile.d/umask.sh</title>
275
276 <indexterm zone="postlfs-config-profile umask.sh">
277 <primary sortas="e-etc-profile.d-umask.sh">/etc/profile.d/umask.sh</primary>
278 </indexterm>
279
280 <para>Setting the <command>umask</command> value is important for security.
281 Here the default group write permissions are turned off for system users and when
282 the user name and group name are not the same.</para>
283
284<screen role="root"><userinput>cat &gt; /etc/profile.d/umask.sh &lt;&lt; "EOF"
285<literal># By default we want the umask to get set.
286if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then
287 umask 002
288else
289 umask 022
290fi</literal>
291EOF</userinput></screen>
292
293 </sect3>
294
295 <sect3 id="X.sh">
296 <title>/etc/profile.d/X.sh</title>
297
298 <indexterm zone="postlfs-config-profile X.sh">
299 <primary sortas="e-etc-profile.d-X.sh">/etc/profile.d/X.sh</primary>
300 </indexterm>
301
302 <para>If <application>X</application> is installed, the <envar>PATH</envar>
303 and <envar>PKG_CONFIG_PATH</envar> variables are also updated.</para>
304
305<screen role="root"><userinput>cat &gt; /etc/profile.d/X.sh &lt;&lt; "EOF"
306<literal>if [ -x /usr/X11R6/bin/X ]; then
307 pathappend /usr/X11R6/bin
308fi
309if [ -d /usr/X11R6/lib/pkgconfig ] ; then
310 pathappend /usr/X11R6/lib/pkgconfig PKG_CONFIG_PATH
311fi</literal>
312EOF</userinput></screen>
313
314 </sect3>
315
316 <sect3 id="titlebars.sh">
317 <title>/etc/profile.d/xterm-titlebars.sh</title>
318
319 <indexterm zone="postlfs-config-profile titlebars.sh">
320 <primary sortas="e-etc-profile.d-titlebars.sh">/etc/profile.d/titlebars.sh</primary>
321 </indexterm>
322
323 <para>This script shows an example of a different way of setting the prompt.
324 The normal variable, <envar>PS1</envar>, is supplemented by
325 <envar>PROMPT_COMMAND</envar>. If set, the value of
326 <envar>PROMPT_COMMAND</envar> is executed as a command prior to
327 issuing each primary prompt.</para>
328
329<screen role="root"><userinput>cat &gt; /etc/profile.d/xterm-titlebars.sh &lt;&lt; "EOF"
330<literal># The substring match ensures this works for "xterm" and "xterm-xfree86".
331if [ "${TERM:0:5}" = "xterm" ]; then
332 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME} : ${PWD}\007"'
333 export PROMPT_COMMAND
334fi</literal>
335EOF</userinput></screen>
336
337 </sect3>
338
339 <sect3 id="i18n.sh">
340 <title><filename>/etc/profile.d/i18n.sh</filename></title>
341
342 <indexterm zone="postlfs-config-profile i18n.sh">
343 <primary sortas="e-etc-profile.d-i18n.sh">/etc/profile.d/i18n.sh</primary>
344 </indexterm>
345
346 <para>This script shows how to set some environment variables necessary for
347 native language support. Setting these variables properly gives you:</para>
348
349 <itemizedlist>
350 <listitem>
351 <para>the output of programs translated into your native language</para>
352 </listitem>
353 <listitem>
354 <para>correct classification of characters into letters, digits and
355 other classes &ndash; this is necessary for <application>Bash</application>
356 to accept keystrokes properly in non-English locales</para>
357 </listitem>
358 <listitem>
359 <para>the alphabetical sorting order correct for your country</para>
360 </listitem>
361 <listitem>
362 <para>proper default paper size</para>
363 </listitem>
364 <listitem>
365 <para>correct formatting of monetary, time and date values</para>
366 </listitem>
367 </itemizedlist>
368
369 <para>Replace <replaceable>[ll]</replaceable> with the two-letter code for
370 your language (e.g., <quote>en</quote>) and
371 <replaceable>[CC]</replaceable> with the two-letter code for your country
372 (e.g., <quote>GB</quote>). Also you may need to specify (and this is actually
373 the preferred form) your character encoding (e.g., <quote>iso8859-1</quote>)
374 after a dot (so that the result is <quote>en_GB.iso8859-1</quote>). Issue the
375 following command for more information:</para>
376
377<screen><userinput>man 3 setlocale</userinput></screen>
378
379 <para>The list of all locales supported by <application>Glibc</application>
380 can be obtained by running the following command:</para>
381
382<screen><userinput>locale -a</userinput></screen>
383
384 <para>After you are sure about your locale settings, create the
385 <filename>/etc/profile.d/i18n.sh</filename> file:</para>
386
387<screen role="root"><userinput>cat &gt; /etc/profile.d/i18n.sh &lt;&lt; "EOF"
388<literal># Set up i18n variables
389export LC_ALL=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
390export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>
391export G_FILENAME_ENCODING=@locale</literal>
392EOF</userinput></screen>
393
394 <para>The <envar>LC_ALL</envar> variable sets the same value for all locale
395 categories. For better control, you may prefer to set values individually for
396 all categories listed in the output of the <command>locale</command>
397 command.</para>
398
399 <para>The <envar>G_FILENAME_ENCODING</envar> variable tells applications
400 such as <application>Glib</application> and <application>GTK+</application>
401 that filenames are in the default locale encoding and not in UTF-8 as
402 assumed by default.</para>
403
404 </sect3>
405
406 <sect3>
407 <title>Other Initialization Values</title>
408
409 <para>Other initialization can easily be added to the
410 <filename>profile</filename> by adding additional scripts to the
411 <filename class='directory'>/etc/profile.d</filename> directory.</para>
412
413 </sect3>
414
415 </sect2>
416
417 <sect2 id="etc-bashrc-profile">
418 <title>/etc/bashrc</title>
419
420 <indexterm zone="postlfs-config-profile etc-bashrc-profile">
421 <primary sortas="e-etc-bashrc">/etc/bashrc</primary>
422 </indexterm>
423
424 <para>Here is a base <filename>/etc/bashrc</filename>. Comments in the
425 file should explain everything you need.</para>
426
427<screen role="root"><userinput>cat &gt; /etc/bashrc &lt;&lt; "EOF"
428<literal># Begin /etc/bashrc
429# Written for Beyond Linux From Scratch
430# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
431# updated by Bruce Dubbs &lt;bdubbs@linuxfromscratch.org&gt;
432
433# Make sure that the terminal is set up properly for each shell
434
435if [ -f /etc/profile.d/tinker-term.sh ]; then
436 source /etc/profile.d/tinker-term.sh
437fi
438
439if [ -f /etc/profile.d/xterm-titlebars.sh ]; then
440 source /etc/profile.d/xterm-titlebars.sh
441fi
442
443# System wide aliases and functions.
444
445# System wide environment variables and startup programs should go into
446# /etc/profile. Personal environment variables and startup programs
447# should go into ~/.bash_profile. Personal aliases and functions should
448# go into ~/.bashrc
449
450# Provides a colored /bin/ls command. Used in conjunction with code in
451# /etc/profile.
452
453alias ls='ls --color=auto'
454
455# Provides prompt for non-login shells, specifically shells started
456# in the X environment. [Review the LFS archive thread titled
457# PS1 Environment Variable for a great case study behind this script
458# addendum.]
459
460#export PS1="[\u@\h \w]\\$ "
461export PS1='\u@\h:\w\$ '
462
463# End /etc/bashrc</literal>
464EOF</userinput></screen>
465
466 </sect2>
467
468 <sect2 id="bash_profile-profile">
469 <title>~/.bash_profile</title>
470
471 <indexterm zone="postlfs-config-profile bash_profile-profile">
472 <primary sortas="e-AA.bash_profile">~/.bash_profile</primary>
473 </indexterm>
474
475 <para>Here is a base <filename>~/.bash_profile</filename>. If you want each
476 new user to have this file automatically, just change the output of
477 the command to <filename>/etc/skel/.bash_profile</filename> and check the
478 permissions after the command is run. You can then copy
479 <filename>/etc/skel/.bash_profile</filename> to the home directories of already
480 existing users, including <systemitem class="username">root</systemitem>,
481 and set the owner and group appropriately.</para>
482
483<screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
484<literal># Begin ~/.bash_profile
485# Written for Beyond Linux From Scratch
486# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
487# updated by Bruce Dubbs &lt;bdubbs@linuxfromscratch.org&gt;
488
489# Personal environment variables and startup programs.
490
491# Personal aliases and functions should go in ~/.bashrc. System wide
492# environment variables and startup programs are in /etc/profile.
493# System wide aliases and functions are in /etc/bashrc.
494
495append () {
496 # First remove the directory
497 local IFS=':'
498 local NEWPATH
499 for DIR in $PATH; do
500 if [ "$DIR" != "$1" ]; then
501 NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
502 fi
503 done
504
505 # Then append the directory
506 export PATH=$NEWPATH:$1
507}
508
509if [ -f "$HOME/.bashrc" ] ; then
510 source $HOME/.bashrc
511fi
512
513if [ -d "$HOME/bin" ] ; then
514 append $HOME/bin
515fi
516
517unset append
518
519# End ~/.bash_profile</literal>
520EOF</userinput></screen>
521
522 </sect2>
523
524 <sect2 id="bashrc-profile">
525 <title>~/.bashrc</title>
526
527 <indexterm zone="postlfs-config-profile bashrc-profile">
528 <primary sortas="e-AA.bashrc">~/.bashrc</primary>
529 </indexterm>
530
531 <para>Here is a base <filename>~/.bashrc</filename>. The comments and
532 instructions for using <filename class="directory">/etc/skel</filename> for
533 <filename>.bash_profile</filename> above also apply here. Only the target file
534 names are different.</para>
535
536<screen><userinput>cat &gt; ~/.bashrc &lt;&lt; "EOF"
537<literal># Begin ~/.bashrc
538# Written for Beyond Linux From Scratch
539# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
540
541# Personal aliases and functions.
542
543# Personal environment variables and startup programs should go in
544# ~/.bash_profile. System wide environment variables and startup
545# programs are in /etc/profile. System wide aliases and functions are
546# in /etc/bashrc.
547
548if [ -f "/etc/bashrc" ] ; then
549 source /etc/bashrc
550fi
551
552# End ~/.bashrc</literal>
553EOF</userinput></screen>
554
555 </sect2>
556
557
558 <sect2 id="bash_logout-profile">
559 <title>~/.bash_logout</title>
560
561 <indexterm zone="postlfs-config-profile bash_logout-profile">
562 <primary sortas="e-AA.bash_logout">~/.bash_logout</primary>
563 </indexterm>
564
565 <para>This is an empty <filename>~/.bash_logout</filename> that can be used as
566 a template. You will notice that the base <filename>~/.bash_logout</filename>
567 does not include a <userinput>clear</userinput> command. This is because the
568 clear is handled in the <filename>/etc/issue</filename> file.</para>
569
570<screen><userinput>cat &gt; ~/.bash_logout &lt;&lt; "EOF"
571<literal># Begin ~/.bash_logout
572# Written for Beyond Linux From Scratch
573# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
574
575# Personal items to perform on logout.
576
577# End ~/.bash_logout</literal>
578EOF</userinput></screen>
579
580 </sect2>
581
582
583 <sect2 id="etc-dircolors-profile">
584 <title>/etc/dircolors</title>
585
586 <indexterm zone="postlfs-config-profile etc-dircolors-profile">
587 <primary sortas="e-etc-dircolors">/etc/dircolors</primary>
588 </indexterm>
589
590 <indexterm zone="postlfs-config-profile etc-dircolors-profile">
591 <primary sortas="e-AA.dircolors">~/.dircolors</primary>
592 </indexterm>
593
594 <para> If you want to use the <filename>dircolors</filename> capability, then
595 run the following command. The <filename class="directory">/etc/skel</filename>
596 setup steps seen above also can be used here to provide a
597 <filename>~/.dircolors</filename> file when a new user is set up. As before,
598 just change the output file name on the following command and assure the
599 permissions, owner, and group are correct on the files created and/or
600 copied.</para>
601
602<screen role="root"><userinput>dircolors -p > /etc/dircolors</userinput></screen>
603
604 <para>If you wish to customize the colors used for different file types, you can
605 edit the <filename>/etc/dircolors</filename> file. The instructions for setting
606 the colors are embedded in the file.</para>
607
608
609 <para>Finally, Ian Macdonald has written an excellent collection of tips and
610 tricks to enhance your shell environment. You can read it online at
611 <ulink url="http://www.caliban.org/bash/index.shtml">
612 http://www.caliban.org/bash/index.shtml</ulink>.</para>
613
614 </sect2>
615
616</sect1>
Note: See TracBrowser for help on using the repository browser.