+ <refsect1>
+ <title>Home Directory</title>
+
+ <para>User applications may want to place files and
+ directories in the user's home directory. They should
+ follow the following basic structure. Note that some
+ 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>. 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>
+ <term><filename>~/.cache</filename></term>
+
+ <listitem><para>Persistent user cache
+ data. User programs may place
+ non-essential data in this
+ directory. Flushing this directory
+ should have no effect on operation of
+ programs, except for increased
+ runtimes necessary to rebuild these
+ caches. If an application finds
+ <varname>$XDG_CACHE_HOME</varname> set
+ is should use the directory specified
+ in it instead of this
+ directory.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>~/.config</filename></term>
+
+ <listitem><para>Application
+ configuration and state. When a new
+ user is created this directory will be
+ empty or not exist at
+ all. Applications should fall back to
+ defaults should their configuration or
+ state in this directory be missing. If
+ an application finds
+ <varname>$XDG_CONFIG_HOME</varname> set
+ is should use the directory specified
+ in it instead of this
+ directory.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>~/.local/bin</filename></term>
+
+ <listitem><para>Executables that shall
+ appear in the user's
+ <varname>$PATH</varname> search
+ path. It is recommended not to place
+ executables in this directory that are
+ not useful for invocation from a
+ shell; these should be placed in a
+ subdirectory of
+ <filename>~/.local/lib</filename>
+ instead. Care should be taken when
+ placing architecture-dependent
+ binaries in this place which might be
+ problematic if the home directory is
+ shared between multiple hosts with
+ different
+ architectures.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>~/.local/lib</filename></term>
+
+ <listitem><para>Static, private vendor
+ data that is compatible with all
+ architectures.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>~/.local/lib/<replaceable>arch-id</replaceable></filename></term>
+
+ <listitem><para>Location for placing
+ public dynamic libraries. The architecture
+ identifier to use, is defined on <ulink
+ url="https://wiki.debian.org/Multiarch/Tuples">Multiarch Architecture Specifiers (Tuples)</ulink>
+ list.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><filename>~/.local/share</filename></term>
+
+ <listitem><para>Resources shared
+ between multiple packages, such as
+ fonts or artwork. Usually, the precise
+ location and format of files stored
+ below this directory is subject to
+ specifications that ensure
+ interoperability. If
+ an application finds
+ <varname>$XDG_DATA_HOME</varname> set
+ is should use the directory specified
+ in it instead of this
+ directory.</para></listitem>
+ </varlistentry>
+
+ </variablelist>
+ </refsect1>
+
+
+ <refsect1>
+ <title>Unprivileged Write Access</title>
+
+ <para>Unprivileged processes generally lack
+ write access to most of the hierarchy.</para>
+
+ <para>The exceptions for normal users are
+ <filename>/tmp</filename>,
+ <filename>/var/tmp</filename>,
+ <filename>/dev/shm</filename>, as well as the home
+ directory <varname>$HOME</varname> (usually found
+ below <filename>/home</filename>) and the runtime
+ directory <varname>$XDG_RUNTIME_DIR</varname> (found
+ below <filename>/run/user</filename>) of the
+ user, which are all writable.</para>
+
+ <para>For unprivileged system processes only
+ <filename>/tmp</filename>,
+ <filename>/var/tmp</filename> and
+ <filename>/dev/shm</filename> are writable. If an
+ 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 privileges in the daemon
+ code, to create it via
+ <citerefentry><refentrytitle>tmpfiles.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ fragments during boot, or via the
+ <varname>RuntimeDirectory=</varname> directive of
+ service units (see
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for details).</para>
+ </refsect1>
+
+ <refsect1>
+ <title>Node Types</title>
+
+ <para>Unix file systems support different types of file
+ nodes, including regular files, directories, symlinks,
+ character and block device nodes, sockets and FIFOs.</para>
+
+ <para>It is strongly recommended that
+ <filename>/dev</filename> is the only location below
+ which device nodes shall be placed. Similar,
+ <filename>/run</filename> shall be the only location
+ to place sockets and FIFOs. Regular files,
+ directories and symlinks may be used in all
+ directories.</para>
+ </refsect1>
+