{"id":3970,"date":"2022-12-20T17:28:33","date_gmt":"2022-12-20T20:28:33","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/filehierarchy-man7\/"},"modified":"2022-12-20T17:28:33","modified_gmt":"2022-12-20T20:28:33","slug":"filehierarchy-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/filehierarchy-man7\/","title":{"rendered":"FILE&minus;HIERARCHY (man7)"},"content":{"rendered":"<h1 align=\"center\">FILE\u2212HIERARCHY<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#GENERAL STRUCTURE\">GENERAL STRUCTURE<\/a><br \/> <a href=\"#RUNTIME DATA\">RUNTIME DATA<\/a><br \/> <a href=\"#VENDOR\u2212SUPPLIED OPERATING SYSTEM RESOURCES\">VENDOR\u2212SUPPLIED OPERATING SYSTEM RESOURCES<\/a><br \/> <a href=\"#PERSISTENT VARIABLE SYSTEM DATA\">PERSISTENT VARIABLE SYSTEM DATA<\/a><br \/> <a href=\"#VIRTUAL KERNEL AND API FILE SYSTEMS\">VIRTUAL KERNEL AND API FILE SYSTEMS<\/a><br \/> <a href=\"#COMPATIBILITY SYMLINKS\">COMPATIBILITY SYMLINKS<\/a><br \/> <a href=\"#HOME DIRECTORY\">HOME DIRECTORY<\/a><br \/> <a href=\"#UNPRIVILEGED WRITE ACCESS\">UNPRIVILEGED WRITE ACCESS<\/a><br \/> <a href=\"#NODE TYPES\">NODE TYPES<\/a><br \/> <a href=\"#SYSTEM PACKAGES\">SYSTEM PACKAGES<\/a><br \/> <a href=\"#USER PACKAGES\">USER PACKAGES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">file-hierarchy \u2212 File system hierarchy overview<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Operating systems using the <b>systemd<\/b>(1) system and service manager are organized based on a file system hierarchy inspired by UNIX, more specifically the hierarchy described in the <b><font color=\"#0000FF\">File System Hierarchy<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">specification and <b>hier<\/b>(7), with various extensions, partially documented in the<\/font> <b><font color=\"#0000FF\">XDG Base Directory Specification<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">and<\/font> <b><font color=\"#0000FF\">XDG User Directories<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">. This manual page describes a more generalized, though minimal and modernized subset of these specifications that defines more strictly the suggestions and restrictions systemd makes on the file system hierarchy.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Many of the paths described here can be queried with the <b>systemd-path<\/b>(1) tool.<\/font><\/p>\n<h2>GENERAL STRUCTURE <a name=\"GENERAL STRUCTURE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The file system root. Usually writable, but this is not required. Possibly a temporary file system (&#8220;tmpfs&#8221;). Not shared with other hosts (unless read\u2212only).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/boot\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The boot partition used for bringing up the system. On EFI systems, this is possibly the EFI System Partition (ESP), also see <b>systemd-gpt-auto-generator<\/b>(8). This directory is usually strictly local to the host, and should be considered read\u2212only, except when a new kernel or boot loader is installed. This directory only exists on systems that run on physical or emulated hardware that requires boot loaders.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/efi\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">If the boot partition \/boot\/ is maintained separately from the EFI System Partition (ESP), the latter is mounted here. Tools that need to operate on the EFI system partition should look for it at this mount point first, and fall back to \/boot\/ \u2014 if the former doesn&#8217;t qualify (for example if it is not a mount point or does not have the correct file system type <b>MSDOS_SUPER_MAGIC<\/b>).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/etc\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">System\u2212specific configuration. This directory may or may not be read\u2212only. Frequently, this directory is pre\u2212populated with vendor\u2212supplied configuration files, but applications should not make assumptions about this directory being fully populated or populated at all, and should fall back to defaults if configuration is missing.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/home\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The location for normal user&#8217;s home directories. Possibly shared with other systems, and never read\u2212only. This directory should only be used for normal users, never for system users. This directory and possibly the directories contained within it might only become available or writable in late boot or even only after user authentication. This directory might be placed on limited\u2212functionality network file systems, hence applications should not assume the full set of file API is available on this directory. Applications should generally not reference this directory directly, but via the per\u2212user <i>$HOME<\/i> environment variable, or via the home directory field of the user database.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/root\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The home directory of the root user. The root user&#8217;s home directory is located outside of \/home\/ in order to make sure the root user may log in even without \/home\/ being available and mounted.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/srv\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The place to store general server payload, managed by the administrator. No restrictions are made how this directory is organized internally. Generally writable, and possibly shared among systems. This directory might become available or writable only very late during boot.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/tmp\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The place for small temporary files. This directory is usually mounted as a &#8220;tmpfs&#8221; instance, and should hence not be used for larger files. (Use \/var\/tmp\/ for larger files.) Since the directory is accessible to other users of the system, it is essential that this directory is only written to with the <b>mkstemp<\/b>(3), <b>mkdtemp<\/b>(3) and related calls. This directory is usually flushed at boot\u2212up. Also, files that are not accessed within a certain time are usually automatically deleted. If applications find the environment variable <i>$TMPDIR<\/i> set, they should prefer using the directory specified in it over directly referencing \/tmp\/ (see <b>environ<\/b>(7) and<\/font> <b><font color=\"#0000FF\">IEEE Std 1003.1<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">for details). For further details about this directory, see<\/font> <b><font color=\"#0000FF\">Using \/tmp\/ And \/var\/tmp\/ Safely<\/font><\/b> <small><font color=\"#000000\">[5]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>RUNTIME DATA <a name=\"RUNTIME DATA\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/run\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A &#8220;tmpfs&#8221; file system for system packages to place runtime data in. This directory is flushed on boot, and generally writable for privileged programs only. Always writable.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/run\/log\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Runtime system logs. System components may place private logs in this directory. Always writable, even when \/var\/log\/ might not be accessible yet.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/run\/user\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Contains per\u2212user runtime directories, each usually individually mounted &#8220;tmpfs&#8221; instances. Always writable, flushed at each reboot and when the user logs out. User code should not reference this directory directly, but via the <i>$XDG_RUNTIME_DIR<\/i> environment variable, as documented in the<\/font> <b><font color=\"#0000FF\">XDG Base Directory Specification<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>VENDOR\u2212SUPPLIED OPERATING SYSTEM RESOURCES <a name=\"VENDOR\u2212SUPPLIED OPERATING SYSTEM RESOURCES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Vendor\u2212supplied operating system resources. Usually read\u2212only, but this is not required. Possibly shared between multiple hosts. This directory should not be modified by the administrator, except when installing or removing vendor\u2212supplied packages.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/bin\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Binaries and executables for user commands that shall appear in the <i>$PATH<\/i> search path. It is recommended not to place binaries in this directory that are not useful for invocation from a shell (such as daemon binaries); these should be placed in a subdirectory of \/usr\/lib\/ instead.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/include\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">C and C++ API header files of system libraries.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/lib\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Static, private vendor data that is compatible with all architectures (though not necessarily architecture\u2212independent). Note that this includes internal executables or other binaries that are not regularly invoked from a shell. Such binaries may be for any architecture supported by the system. Do not place public libraries in this directory, use <i>$libdir<\/i> (see below), instead.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/lib\/<i>arch\u2212id<\/i>\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Location for placing dynamic libraries into, also called <i>$libdir<\/i>. The architecture identifier to use is defined on<\/font> <b><font color=\"#0000FF\">Multiarch Architecture Specifiers (Tuples)<\/font><\/b> <small><font color=\"#000000\">[6]<\/font><\/small> <font color=\"#000000\">list. Legacy locations of <i>$libdir<\/i> are \/usr\/lib\/, \/usr\/lib64\/. This directory should not be used for package\u2212specific data, unless this data is architecture\u2212dependent, too. To query <i>$libdir<\/i> for the primary architecture of the system, invoke:<\/font><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><font color=\"#000000\"># systemd\u2212path system\u2212library\u2212arch<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/share\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Resources shared between multiple packages, such as documentation, man pages, time zone information, fonts and other resources. Usually, the precise location and format of files stored below this directory is subject to specifications that ensure interoperability.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/share\/doc\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Documentation for the operating system or system packages.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/share\/factory\/etc\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Repository for vendor\u2212supplied default configuration files. This directory should be populated with pristine vendor versions of all configuration files that may be placed in \/etc\/. This is useful to compare the local configuration of a system with vendor defaults and to populate the local configuration with defaults.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/usr\/share\/factory\/var\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Similar to \/usr\/share\/factory\/etc\/, but for vendor versions of files in the variable, persistent data directory \/var\/.<\/font><\/p>\n<h2>PERSISTENT VARIABLE SYSTEM DATA <a name=\"PERSISTENT VARIABLE SYSTEM DATA\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Persistent, variable system data. Must be writable. This directory might be pre\u2212populated with vendor\u2212supplied data, but applications should be able to reconstruct necessary files and directories in this subhierarchy should they be missing, as the system might start up without this directory being populated. Persistency is recommended, but optional, to support ephemeral systems. This directory might become available or writable only very late during boot. Components that are required to operate during early boot hence shall not unconditionally rely on this directory.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/cache\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Persistent system cache data. System components may place non\u2212essential data in this directory. Flushing this directory should have no effect on operation of programs, except for increased runtimes necessary to rebuild these caches.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/lib\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Persistent system data. System components may place private data in this directory.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/log\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Persistent system logs. System components may place private logs in this directory, though it is recommended to do most logging via the <b>syslog<\/b>(3) and <b>sd_journal_print<\/b>(3) calls.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/spool\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Persistent system spool data, such as printer or mail queues.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/tmp\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The place for larger and persistent temporary files. In contrast to \/tmp\/, this directory is usually mounted from a persistent physical file system and can thus accept larger files. (Use \/tmp\/ for smaller files.) This directory is generally not flushed at boot\u2212up, but time\u2212based cleanup of files that have not been accessed for a certain time is applied. The same security restrictions as with \/tmp\/ apply, and hence only <b>mkstemp<\/b>(3), <b>mkdtemp<\/b>(3) or similar calls should be used to make use of this directory. If applications find the environment variable <i>$TMPDIR<\/i> set, they should prefer using the directory specified in it over directly referencing \/var\/tmp\/ (see <b>environ<\/b>(7) for details). For further details about this directory, see<\/font> <b><font color=\"#0000FF\">Using \/tmp\/ And \/var\/tmp\/ Safely<\/font><\/b> <small><font color=\"#000000\">[5]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>VIRTUAL KERNEL AND API FILE SYSTEMS <a name=\"VIRTUAL KERNEL AND API FILE SYSTEMS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/dev\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The root directory for device nodes. Usually, this directory is mounted as a &#8220;devtmpfs&#8221; instance, but might be of a different type in sandboxed\/containerized setups. This directory is managed jointly by the kernel and <b>systemd-udevd<\/b>(8), and should not be written to by other components. A number of special purpose virtual file systems might be mounted below this directory.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/dev\/shm\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Place for POSIX shared memory segments, as created via <b>shm_open<\/b>(3). This directory is flushed on boot, and is a &#8220;tmpfs&#8221; file system. Since all users have write access to this directory, special care should be taken to avoid name clashes and vulnerabilities. For normal users, shared memory segments in this directory are usually deleted when the user logs out. Usually, it is a better idea to use memory mapped files in \/run\/ (for system programs) or <i>$XDG_RUNTIME_DIR<\/i> (for user programs) instead of POSIX shared memory segments, since these directories are not world\u2212writable and hence not vulnerable to security\u2212sensitive name clashes.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/proc\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A virtual kernel file system exposing the process list and other functionality. This file system is mostly an API to interface with the kernel and not a place where normal files may be stored. For details, see <b>proc<\/b>(5). A number of special purpose virtual file systems might be mounted below this directory.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/proc\/sys\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A hierarchy below \/proc\/ that exposes a number of kernel tunables. The primary way to configure the settings in this API file tree is via <b>sysctl.d<\/b>(5) files. In sandboxed\/containerized setups, this directory is generally mounted read\u2212only.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/sys\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A virtual kernel file system exposing discovered devices and other functionality. This file system is mostly an API to interface with the kernel and not a place where normal files may be stored. In sandboxed\/containerized setups, this directory is generally mounted read\u2212only. A number of special purpose virtual file systems might be mounted below this directory.<\/font><\/p>\n<h2>COMPATIBILITY SYMLINKS <a name=\"COMPATIBILITY SYMLINKS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/bin\/, \/sbin\/, \/usr\/sbin\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">These compatibility symlinks point to \/usr\/bin\/, ensuring that scripts and binaries referencing these legacy paths correctly find their binaries.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/lib\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">This compatibility symlink points to \/usr\/lib\/, ensuring that programs referencing this legacy path correctly find their resources.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/lib64\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">On some architecture ABIs, this compatibility symlink points to <i>$libdir<\/i>, ensuring that binaries referencing this legacy path correctly find their dynamic loader. This symlink only exists on architectures whose ABI places the dynamic loader in this path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\/var\/run\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">This compatibility symlink points to \/run\/, ensuring that programs referencing this legacy path correctly find their runtime data.<\/font><\/p>\n<h2>HOME DIRECTORY <a name=\"HOME DIRECTORY\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">User applications may want to place files and directories in the user&#8217;s home directory. They should follow the following basic structure. Note that some of these directories are also standardized (though more weakly) by the<\/font> <b><font color=\"#0000FF\">XDG Base Directory Specification<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">. Additional locations for high\u2212level user resources are defined by<\/font> <b><font color=\"#0000FF\">xdg\u2212user\u2212dirs<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">~\/.cache\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Persistent user cache data. User programs may place non\u2212essential 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 <i>$XDG_CACHE_HOME<\/i> set, it should use the directory specified in it instead of this directory.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">~\/.config\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">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 <i>$XDG_CONFIG_HOME<\/i> set, it should use the directory specified in it instead of this directory.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">~\/.local\/bin\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Executables that shall appear in the user&#8217;s <i>$PATH<\/i> 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 ~\/.local\/lib\/ instead. Care should be taken when placing architecture\u2212dependent binaries in this place, which might be problematic if the home directory is shared between multiple hosts with different architectures.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">~\/.local\/lib\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Static, private vendor data that is compatible with all architectures.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">~\/.local\/lib\/<i>arch\u2212id<\/i>\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Location for placing public dynamic libraries. The architecture identifier to use is defined on<\/font> <b><font color=\"#0000FF\">Multiarch Architecture Specifiers (Tuples)<\/font><\/b> <small><font color=\"#000000\">[6]<\/font><\/small> <font color=\"#000000\">list.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">~\/.local\/share\/<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">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 <i>$XDG_DATA_HOME<\/i> set, it should use the directory specified in it instead of this directory.<\/font><\/p>\n<h2>UNPRIVILEGED WRITE ACCESS <a name=\"UNPRIVILEGED WRITE ACCESS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Unprivileged processes generally lack write access to most of the hierarchy.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The exceptions for normal users are \/tmp\/, \/var\/tmp\/, \/dev\/shm\/, as well as the home directory <i>$HOME<\/i> (usually found below \/home\/) and the runtime directory <i>$XDG_RUNTIME_DIR<\/i> (found below \/run\/user\/) of the user, which are all writable.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">For unprivileged system processes, only \/tmp\/, \/var\/tmp\/ and \/dev\/shm\/ are writable. If an unprivileged system process needs a private writable directory in \/var\/ or \/run\/, it is recommended to either create it before dropping privileges in the daemon code, to create it via <b>tmpfiles.d<\/b>(5) fragments during boot, or via the <i>StateDirectory=<\/i> and <i>RuntimeDirectory=<\/i> directives of service units (see <b>systemd.unit<\/b>(5) for details).<\/font><\/p>\n<h2>NODE TYPES <a name=\"NODE TYPES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Unix file systems support different types of file nodes, including regular files, directories, symlinks, character and block device nodes, sockets and FIFOs.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">It is strongly recommended that \/dev\/ is the only location below which device nodes shall be placed. Similarly, \/run\/ shall be the only location to place sockets and FIFOs. Regular files, directories and symlinks may be used in all directories.<\/font><\/p>\n<h2>SYSTEM PACKAGES <a name=\"SYSTEM PACKAGES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Developers of system packages should follow strict rules when placing their own files in the file system. The following table lists recommended locations for specific types of files supplied by the vendor.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a01.\u00a0System Package Vendor Files Locations<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-945591.png\" alt=\"Image grohtml-945591.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Additional static vendor files may be installed in the \/usr\/share\/ hierarchy to the locations defined by the various relevant specifications.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">During runtime, and for local configuration and runtime state, additional directories are defined:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a02.\u00a0System Package Variable Files Locations<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-945592.png\" alt=\"Image grohtml-945592.png\"><\/b><\/font><\/p>\n<h2>USER PACKAGES <a name=\"USER PACKAGES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Programs running in user context should follow strict rules when placing their own files in the user&#8217;s home directory. The following table lists recommended locations in the home directory for specific types of files supplied by the vendor if the application is installed in the home directory. (Note, however, that user applications installed system\u2212wide should follow the rules outlined above regarding placing vendor files.)<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a03.\u00a0User Package Vendor File Locations<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-945593.png\" alt=\"Image grohtml-945593.png\"><\/b><\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Additional static vendor files may be installed in the ~\/.local\/share\/ hierarchy to the locations defined by the various relevant specifications.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">During runtime, and for local configuration and state, additional directories are defined:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Table\u00a04.\u00a0User Package Variable File Locations<\/b><\/font><\/p>\n<p align=\"center\"><font color=\"#000000\"><b><img decoding=\"async\" src=\"grohtml-945594.png\" alt=\"Image grohtml-945594.png\"><\/b><\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd<\/b>(1), <b>hier<\/b>(7), <b>systemd-path<\/b>(1), <b>systemd-gpt-auto-generator<\/b>(8), <b>sysctl.d<\/b>(5), <b>tmpfiles.d<\/b>(5), <b>pkg-config<\/b>(1), <b>systemd.unit<\/b>(5)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">File System Hierarchy<\/font><\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/refspecs.linuxfoundation.org\/FHS_3.0\/fhs-3.0.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"49%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">XDG Base Directory Specification<\/font><\/p>\n<\/td>\n<td width=\"34%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/standards.freedesktop.org\/basedir-spec\/basedir-spec-latest.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">XDG User Directories<\/font><\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/xdg-user-dirs\/<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">IEEE Std 1003.1<\/font><\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/basedefs\/V1_chap08.html#tag_08_03<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">5.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"49%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Using \/tmp\/ And \/var\/tmp\/ Safely<\/font><\/p>\n<\/td>\n<td width=\"34%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/TEMPORARY_DIRECTORIES<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">6.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"65%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Multiarch Architecture Specifiers (Tuples)<\/font><\/p>\n<\/td>\n<td width=\"18%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/wiki.debian.org\/Multiarch\/Tuples<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  file-hierarchy \u2212 File system hierarchy overview <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,1060,972],"class_list":["post-3970","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-file-hierarchy","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3970","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3970"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3970\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}