specifically the hierarchy described in the <ulink
url="http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html">File
System Hierarchy</ulink> specification and
- <citerefentry><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>. This
+ <citerefentry project='man-pages'><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>. This
manual page describes a more minimal, modernized
subset of these specifications that defines more
strictly the suggestions and restrictions systemd
makes on the file system hierarchy.</para>
+
+ <para>Many of the paths described here are queriable
+ with the
+ <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+ tool.</para>
</refsect1>
<refsect1>
used for bringing up the system. On
EFI systems this is possibly the EFI
System Partition, also see
- <citerefentry><refentrytitle>systemd-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>. This
+ <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>. This
directory is usually strictly local
to the host, and should be considered
read-only, except when a new kernel or
accessible to other users of the
system it is essential that this
directory is only written to with the
- <citerefentry><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ <citerefentry project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
and related calls. This directory is
usually flushed at boot-up. Also,
files that are not accessed within a
should prefer using the directory
specified in it over directly
referencing
- <filename>/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details).</para></listitem>
+ <filename>/tmp</filename> (see <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ and
+ <ulink url="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03">IEEE Std 1003.1</ulink> for details).</para></listitem>
</varlistentry>
</variablelist>
</varlistentry>
<varlistentry>
- <term><varname>$libdir</varname></term>
+ <term><filename>/usr/lib/<replaceable>arch-id</replaceable></filename></term>
<listitem><para>Location for placing
- dynamic libraries. The precise
- location depends on the operating
- system and the architecture, and is
- sometimes
+ dynamic libraries, also called <varname>$libdir</varname>.
+ The architecture identifier to use is defined on <ulink
+ url="https://wiki.debian.org/Multiarch/Tuples">Multiarch Architecture Specifiers (Tuples)</ulink>
+ list. Legacy locations of <varname>$libdir</varname> are
<filename>/usr/lib</filename>,
- <filename>/use/lib64</filename> or
- <filename>/usr/lib/</filename>
- suffixed by an architecture
- identifier. This directory should not
+ <filename>/usr/lib64</filename>.
+ This directory should not
be used for package-specific data,
unless this data is
architecture-dependent, too. To query
<varname>$libdir</varname> for the
primary architecture of the system,
- invoke
- <programlisting># pkg-config --variable=libdir systemd</programlisting></para></listitem>
+ invoke:
+ <programlisting># pkg-config --variable=libdir systemd</programlisting> or
+ <programlisting># systemd-path system-library-arch</programlisting>
+ </para></listitem>
+
</varlistentry>
<varlistentry>
private logs in this directory, though
it is recommended to do most logging
via the
- <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
and
<citerefentry><refentrytitle>sd_journal_print</refentrytitle><manvolnum>3</manvolnum></citerefentry>
calls.</para></listitem>
restrictions as with
<filename>/tmp</filename> apply, and
hence only
- <citerefentry><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ <citerefentry project='man-pages'><refentrytitle>mkstemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>mkdtemp</refentrytitle><manvolnum>3</manvolnum></citerefentry>
or similar calls should be used to
make use of this directory. If
applications find the environment
set they should prefer using the
directory specified in it over
directly referencing
- <filename>/var/tmp</filename> (see <citerefentry><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry> for details).
+ <filename>/var/tmp</filename> (see <citerefentry project='man-pages'><refentrytitle>environ</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ for details).
</para></listitem>
</varlistentry>
is mostly an API to interface with the
kernel and not a place where normal
files may be stored. For details, see
- <citerefentry><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. A
+ <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. A
number of special purpose virtual file
systems might be mounted below this
directory.</para></listitem>
of these directories are also standardized (though
more weakly) by the <ulink
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
- Base Directory Specification</ulink>.</para>
+ Base Directory Specification</ulink>. Additional
+ locations for high-level user resources are defined by
+ <ulink
+ url="http://www.freedesktop.org/wiki/Software/xdg-user-dirs/">xdg-user-dirs</ulink>.</para>
<variablelist>
<varlistentry>
<listitem><para>Location for placing
public dynamic libraries. The architecture
- identifier to use is defined on <ulink
+ identifier to use, is defined on <ulink
url="https://wiki.debian.org/Multiarch/Tuples">Multiarch Architecture Specifiers (Tuples)</ulink>
list.</para></listitem>
</varlistentry>
<refsect1>
- <title>Unpriviliged Write Access</title>
+ <title>Unprivileged Write Access</title>
- <para>Unpriviliged processes generally lack
+ <para>Unprivileged processes generally lack
write access to most of the hierarchy.</para>
<para>The exceptions for normal users are
below <filename>/run/user</filename>) of the
user, which are all writable.</para>
- <para>For unpriviliged system processes only
+ <para>For unprivileged system processes only
<filename>/tmp</filename>,
<filename>/var/tmp</filename> and
<filename>/dev/shm</filename> are writable. If an
- unpriviliged system process needs a private, writable
+ unprivileged system process needs a private, writable
directory in <filename>/var</filename> or
<filename>/run</filename>, it is recommended to either
- create it before dropping priviliges in the daemon
+ create it before dropping privileges in the daemon
code, to create it via
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
fragments during boot, or via the
<tbody>
<row>
<entry><filename>/usr/bin</filename></entry>
- <entry>Package executables that shall appear in the <varname>$PATH</varname> executable search path, compiled for the primary architecture of the operating system. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries. As this directory is shared with most other packages of the system special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</entry>
+ <entry>Package executables that shall appear in the <varname>$PATH</varname> executable search path, compiled for any of the supported architectures compatible with the operating system. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries. As this directory is shared with most other packages of the system special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</entry>
</row>
<row>
- <entry><filename>$libdir</filename></entry>
+ <entry><filename>/usr/lib/<replaceable>arch-id</replaceable></filename></entry>
<entry>Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</entry>
</row>
<row>
<entry>Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data.</entry>
</row>
<row>
- <entry><filename>$libdir/<replaceable>package</replaceable></filename></entry>
- <entry>Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. Note that this generally does not include private exectuables since binaries of a specific architecture may be freely invoked from any other supported system architecture.</entry>
+ <entry><filename>/usr/lib/<replaceable>arch-id</replaceable>/<replaceable>package</replaceable></filename></entry>
+ <entry>Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. Note that this generally does not include private executables since binaries of a specific architecture may be freely invoked from any other supported system architecture.</entry>
</row>
<row>
<entry><filename>/usr/include/<replaceable>package</replaceable></filename></entry>
</row>
<row>
<entry><filename>~/.local/lib/<replaceable>package</replaceable></filename></entry>
- <entry>Private, static vendor resources of the package, compatible wih any architecture, or any other kind of read-only vendor data.</entry>
+ <entry>Private, static vendor resources of the package, compatible with any architecture, or any other kind of read-only vendor data.</entry>
</row>
<row>
<entry><filename>~/.local/lib/<replaceable>arch-id</replaceable>/<replaceable>package</replaceable></filename></entry>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>systemd-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+ <citerefentry project='man-pages'><refentrytitle>hier</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-path</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry><refentrytitle>systemd-efi-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+ <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
</para>
</refsect1>