/usr/share/doc/zsh-common/html/Files.html is in zsh-doc 5.4.2-3ubuntu3.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>5 Files (zsh)</title>
<meta name="description" content="5 Files (zsh)">
<meta name="keywords" content="5 Files (zsh)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2any">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Files"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="Invocation.html#Invocation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="Invocation.html#Restricted-Shell" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="index.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Startup_002fShutdown-Files" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left">[<a href="Shell-Grammar.html#Shell-Grammar" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="index.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="zsh_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="Concept-Index.html#Concept-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="zsh_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Files-1"></a>
<h1 class="chapter">5 Files</h1>
<hr>
<a name="Startup_002fShutdown-Files"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Files" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Files" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Files" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="#Files-2" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left">[<a href="Shell-Grammar.html#Shell-Grammar" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="index.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="zsh_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="Concept-Index.html#Concept-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="zsh_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">5.1 Startup/Shutdown Files</h2>
<p><a name="index-files_002c-startup"></a>
<a name="index-startup-files"></a>
<a name="index-files_002c-shutdown"></a>
<a name="index-shutdown-files"></a>
<a name="index-RCS_002c-use-of"></a>
<a name="index-GLOBAL_005fRCS_002c-use-of"></a>
<a name="index-NO_005fRCS_002c-use-of"></a>
<a name="index-NO_005fGLOBAL_005fRCS_002c-use-of"></a>
<a name="index-ZDOTDIR_002c-use-of"></a>
<a name="index-zshenv"></a>
Commands are first read from <tt>/etc/zsh/zshenv</tt>; this cannot be overridden.
Subsequent behaviour is modified by the <tt>RCS</tt> and
<tt>GLOBAL_RCS</tt> options; the former affects all startup files, while the
second only affects global startup files (those shown here with an
path starting with a <tt>/</tt>). If one of the options
is unset at any point, any subsequent startup file(s)
of the corresponding
type will not be read. It is also possible for a file in <tt>$ZDOTDIR</tt> to
re-enable <tt>GLOBAL_RCS</tt>. Both <tt>RCS</tt> and <tt>GLOBAL_RCS</tt> are set by
default.
</p>
<p>Commands are then read from <tt>$ZDOTDIR/.zshenv</tt>.
<a name="index-LOGIN_002c-use-of"></a>
<a name="index-zprofile"></a>
If the shell is a login shell, commands
are read from <tt>/etc/zsh/zprofile</tt> and then <tt>$ZDOTDIR/.zprofile</tt>.
<a name="index-zshrc"></a>
Then, if the shell is interactive,
commands are read from <tt>/etc/zsh/zshrc</tt> and then <tt>$ZDOTDIR/.zshrc</tt>.
<a name="index-zlogin"></a>
Finally, if the shell is a login shell, <tt>/etc/zsh/zlogin</tt> and
<tt>$ZDOTDIR/.zlogin</tt> are read.
</p>
<p><a name="index-zlogout"></a>
When a login shell exits, the files <tt>$ZDOTDIR/.zlogout</tt> and then
<tt>/etc/zsh/zlogout</tt> are read. This happens with either an explicit exit
via the <tt>exit</tt> or <tt>logout</tt> commands, or an implicit exit by reading
end-of-file from the terminal. However, if the shell terminates due
to <tt>exec</tt>’ing another process, the logout files are not read.
These are also affected by the <tt>RCS</tt> and <tt>GLOBAL_RCS</tt> options.
Note also that the <tt>RCS</tt> option affects the saving of history files,
i.e. if <tt>RCS</tt> is unset when the shell exits, no history file will be
saved.
</p>
<p><a name="index-HOME_002c-use-of"></a>
If <tt>ZDOTDIR</tt> is unset, <tt>HOME</tt> is used instead.
Files listed above as being in <tt>/etc</tt> may be in another
directory, depending on the installation.
</p>
<p>As <tt>/etc/zsh/zshenv</tt> is run for all instances of zsh, it is important that
it be kept as small as possible. In particular, it is a good idea to
put code that does not need to be run for every single shell behind
a test of the form ‘<tt>if [[ -o rcs ]]; then ...</tt>’ so that it will not
be executed when zsh is invoked with the ‘<tt>-f</tt>’ option.
</p>
<hr>
<a name="Files-2"></a>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Files" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Startup_002fShutdown-Files" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#Files" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="Shell-Grammar.html#Shell-Grammar" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left">[<a href="Shell-Grammar.html#Shell-Grammar" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="index.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="zsh_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="Concept-Index.html#Concept-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="zsh_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section">5.2 Files</h2>
<p><a name="index-files-used"></a>
</p><dl compact="compact">
<dt><tt>$ZDOTDIR/.zshenv</tt></dt>
<dt><tt>$ZDOTDIR/.zprofile</tt></dt>
<dt><tt>$ZDOTDIR/.zshrc</tt></dt>
<dt><tt>$ZDOTDIR/.zlogin</tt></dt>
<dt><tt>$ZDOTDIR/.zlogout</tt></dt>
<dt><tt>${TMPPREFIX}*</tt> (default is /tmp/zsh*)</dt>
<dt><tt>/etc/zsh/zshenv</tt></dt>
<dt><tt>/etc/zsh/zprofile</tt></dt>
<dt><tt>/etc/zsh/zshrc</tt></dt>
<dt><tt>/etc/zsh/zlogin</tt></dt>
<dt><tt>/etc/zsh/zlogout</tt> (installation-specific - <tt>/etc</tt> is the default)</dt>
</dl>
<br>
<p>Any of these files may be pre-compiled with the <tt>zcompile</tt> builtin
command (<a href="Shell-Builtin-Commands.html#Shell-Builtin-Commands">Shell Builtin Commands</a>). If a compiled file exists (named for the original file plus the
<tt>.zwc</tt> extension) and it is newer than the original file, the compiled
file will be used instead.
</p><hr>
<table class="header" cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Files" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="Shell-Grammar.html#Shell-Grammar" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="index.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="zsh_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="Concept-Index.html#Concept-Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="zsh_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p><font size="-1">
This document was generated on <em>September 10, 2018</em> using <a href="http://www.gnu.org/software/texinfo/"><em>texi2any</em></a>.
</font></p>
<font size="-1">Zsh version 5.4.2, released on August 27, 2017.</font>
</body>
</html>
|