{
    "content": [
        {
            "type": "text",
            "text": "# file-hierarchy(7) (man)\n\n**Summary:** file-hierarchy - File system hierarchy overview\n\n## See Also\n\n- systemd(1)\n- hier(7)\n- systemd-path(1)\n- systemd-gpt-auto-generator(8)\n- sysctl.d(5)\n- tmpfiles.d(5)\n- pkg-config(1)\n- systemd.unit(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (10 lines)\n- **GENERAL STRUCTURE** (58 lines)\n- **RUNTIME DATA** (14 lines)\n- **VENDOR-SUPPLIED OPERATING SYSTEM RESOURCES** (48 lines)\n- **PERSISTENT VARIABLE SYSTEM DATA** (39 lines)\n- **VIRTUAL KERNEL AND API FILE SYSTEMS** (47 lines)\n- **COMPATIBILITY SYMLINKS** (17 lines)\n- **HOME DIRECTORY** (39 lines)\n- **UNPRIVILEGED WRITE ACCESS** (20 lines)\n- **NODE TYPES** (7 lines)\n- **SYSTEM PACKAGES** (4 lines) — 2 subsections\n  - Table 1. System package vendor files locations (55 lines)\n  - Table 2. System package variable files locations (84 lines)\n- **USER PACKAGES** (6 lines) — 2 subsections\n  - Table 3. Vendor package file locations under the home direct (43 lines)\n  - Table 4. User package variable file locations (25 lines)\n- **SEE ALSO** (3 lines)\n- **NOTES** (21 lines)\n\n## Full Content\n\n### NAME\n\nfile-hierarchy - File system hierarchy overview\n\n### DESCRIPTION\n\nOperating systems using the systemd(1) system and service manager are organized based on a\nfile system hierarchy inspired by UNIX, more specifically the hierarchy described in the File\nSystem Hierarchy[1] specification and hier(7), with various extensions, partially documented\nin the XDG Base Directory Specification[2] and XDG User Directories[3]. This manual page\ndescribes a more generalized, though minimal and modernized subset of these specifications\nthat defines more strictly the suggestions and restrictions systemd makes on the file system\nhierarchy.\n\nMany of the paths described here can be queried with the systemd-path(1) tool.\n\n### GENERAL STRUCTURE\n\n/\nThe file system root. Usually writable, but this is not required. Possibly a temporary\nfile system (\"tmpfs\"). Not shared with other hosts (unless read-only).\n\n/boot/\nThe boot partition used for bringing up the system. On EFI systems, this is possibly the\nEFI System Partition (ESP), also see systemd-gpt-auto-generator(8). This directory is\nusually strictly local to the host, and should be considered read-only, except when a new\nkernel or boot loader is installed. This directory only exists on systems that run on\nphysical or emulated hardware that requires boot loaders.\n\n/efi/\nIf the boot partition /boot/ is maintained separately from the EFI System Partition\n(ESP), the latter is mounted here. Tools that need to operate on the EFI system partition\nshould look for it at this mount point first, and fall back to /boot/ — if the former\ndoesn't qualify (for example if it is not a mount point or does not have the correct file\nsystem type MSDOSSUPERMAGIC).\n\n/etc/\nSystem-specific configuration. This directory may or may not be read-only. Frequently,\nthis directory is pre-populated with vendor-supplied configuration files, but\napplications should not make assumptions about this directory being fully populated or\npopulated at all, and should fall back to defaults if configuration is missing.\n\n/home/\nThe location for normal user's home directories. Possibly shared with other systems, and\nnever read-only. This directory should only be used for normal users, never for system\nusers. This directory and possibly the directories contained within it might only become\navailable or writable in late boot or even only after user authentication. This directory\nmight be placed on limited-functionality network file systems, hence applications should\nnot assume the full set of file API is available on this directory. Applications should\ngenerally not reference this directory directly, but via the per-user $HOME environment\nvariable, or via the home directory field of the user database.\n\n/root/\nThe home directory of the root user. The root user's home directory is located outside of\n/home/ in order to make sure the root user may log in even without /home/ being available\nand mounted.\n\n/srv/\nThe place to store general server payload, managed by the administrator. No restrictions\nare made how this directory is organized internally. Generally writable, and possibly\nshared among systems. This directory might become available or writable only very late\nduring boot.\n\n/tmp/\nThe place for small temporary files. This directory is usually mounted as a \"tmpfs\"\ninstance, and should hence not be used for larger files. (Use /var/tmp/ for larger\nfiles.) This directory is usually flushed at boot-up. Also, files that are not accessed\nwithin a certain time may be automatically deleted.\n\nIf applications find the environment variable $TMPDIR set, they should use the directory\nspecified in it instead of /tmp/ (see environ(7) and IEEE Std 1003.1[4] for details).\n\nSince /tmp/ is accessible to other users of the system, it is essential that files and\nsubdirectories under this directory are only created with mkstemp(3), mkdtemp(3), and\nsimilar calls. For more details, see Using /tmp/ and /var/tmp/ Safely[5].\n\n### RUNTIME DATA\n\n/run/\nA \"tmpfs\" file system for system packages to place runtime data in. This directory is\nflushed on boot, and generally writable for privileged programs only. Always writable.\n\n/run/log/\nRuntime system logs. System components may place private logs in this directory. Always\nwritable, even when /var/log/ might not be accessible yet.\n\n/run/user/\nContains per-user runtime directories, each usually individually mounted \"tmpfs\"\ninstances. Always writable, flushed at each reboot and when the user logs out. User code\nshould not reference this directory directly, but via the $XDGRUNTIMEDIR environment\nvariable, as documented in the XDG Base Directory Specification[2].\n\n### VENDOR-SUPPLIED OPERATING SYSTEM RESOURCES\n\n/usr/\nVendor-supplied operating system resources. Usually read-only, but this is not required.\nPossibly shared between multiple hosts. This directory should not be modified by the\nadministrator, except when installing or removing vendor-supplied packages.\n\n/usr/bin/\nBinaries and executables for user commands that shall appear in the $PATH search path. It\nis recommended not to place binaries in this directory that are not useful for invocation\nfrom a shell (such as daemon binaries); these should be placed in a subdirectory of\n/usr/lib/ instead.\n\n/usr/include/\nC and C++ API header files of system libraries.\n\n/usr/lib/\nStatic, private vendor data that is compatible with all architectures (though not\nnecessarily architecture-independent). Note that this includes internal executables or\nother binaries that are not regularly invoked from a shell. Such binaries may be for any\narchitecture supported by the system. Do not place public libraries in this directory,\nuse $libdir (see below), instead.\n\n/lib/arch-id/\nLocation for placing dynamic libraries into, also called $libdir. The architecture\nidentifier to use is defined on Multiarch Architecture Specifiers (Tuples)[6] list.\nLegacy locations of $libdir are /lib/, /lib64/. This directory should not be used for\npackage-specific data, unless this data is architecture-dependent, too. To query $libdir\nfor the primary architecture of the system, invoke:\n\n# systemd-path system-library-arch\n\n/usr/share/\nResources shared between multiple packages, such as documentation, man pages, time zone\ninformation, fonts and other resources. Usually, the precise location and format of files\nstored below this directory is subject to specifications that ensure interoperability.\n\n/usr/share/doc/\nDocumentation for the operating system or system packages.\n\n/usr/share/factory/etc/\nRepository for vendor-supplied default configuration files. This directory should be\npopulated with pristine vendor versions of all configuration files that may be placed in\n/etc/. This is useful to compare the local configuration of a system with vendor defaults\nand to populate the local configuration with defaults.\n\n/usr/share/factory/var/\nSimilar to /usr/share/factory/etc/, but for vendor versions of files in the variable,\npersistent data directory /var/.\n\n### PERSISTENT VARIABLE SYSTEM DATA\n\n/var/\nPersistent, variable system data. Must be writable. This directory might be pre-populated\nwith vendor-supplied data, but applications should be able to reconstruct necessary files\nand directories in this subhierarchy should they be missing, as the system might start up\nwithout this directory being populated. Persistency is recommended, but optional, to\nsupport ephemeral systems. This directory might become available or writable only very\nlate during boot. Components that are required to operate during early boot hence shall\nnot unconditionally rely on this directory.\n\n/var/cache/\nPersistent system cache data. System components may place non-essential data in this\ndirectory. Flushing this directory should have no effect on operation of programs, except\nfor increased runtimes necessary to rebuild these caches.\n\n/var/lib/\nPersistent system data. System components may place private data in this directory.\n\n/var/log/\nPersistent system logs. System components may place private logs in this directory,\nthough it is recommended to do most logging via the syslog(3) and sdjournalprint(3)\ncalls.\n\n/var/spool/\nPersistent system spool data, such as printer or mail queues.\n\n/var/tmp/\nThe place for larger and persistent temporary files. In contrast to /tmp/, this directory\nis usually mounted from a persistent physical file system and can thus accept larger\nfiles. (Use /tmp/ for small ephemeral files.) This directory is generally not flushed at\nboot-up, but time-based cleanup of files that have not been accessed for a certain time\nis applied.\n\nIf applications find the environment variable $TMPDIR set, they should use the directory\nspecified in it instead of /var/tmp/ (see environ(7) for details).\n\nThe same security restrictions as with /tmp/ apply: mkstemp(3), mkdtemp(3), and similar\ncalls should be used. For further details about this directory, see Using /tmp/ and\n/var/tmp/ Safely[5].\n\n### VIRTUAL KERNEL AND API FILE SYSTEMS\n\n/dev/\nThe root directory for device nodes. Usually, this directory is mounted as a \"devtmpfs\"\ninstance, but might be of a different type in sandboxed/containerized setups. This\ndirectory is managed jointly by the kernel and systemd-udevd(8), and should not be\nwritten to by other components. A number of special purpose virtual file systems might be\nmounted below this directory.\n\n/dev/shm/\nPlace for POSIX shared memory segments, as created via shmopen(3). This directory is\nflushed on boot, and is a \"tmpfs\" file system. Since all users have write access to this\ndirectory, special care should be taken to avoid name clashes and vulnerabilities. For\nnormal users, shared memory segments in this directory are usually deleted when the user\nlogs out. Usually, it is a better idea to use memory mapped files in /run/ (for system\nprograms) or $XDGRUNTIMEDIR (for user programs) instead of POSIX shared memory\nsegments, since these directories are not world-writable and hence not vulnerable to\nsecurity-sensitive name clashes.\n\n/proc/\nA virtual kernel file system exposing the process list and other functionality. This file\nsystem is mostly an API to interface with the kernel and not a place where normal files\nmay be stored. For details, see proc(5). A number of special purpose virtual file systems\nmight be mounted below this directory.\n\n/proc/sys/\nA hierarchy below /proc/ that exposes a number of kernel tunables. The primary way to\nconfigure the settings in this API file tree is via sysctl.d(5) files. In\nsandboxed/containerized setups, this directory is generally mounted read-only.\n\n/sys/\nA virtual kernel file system exposing discovered devices and other functionality. This\nfile system is mostly an API to interface with the kernel and not a place where normal\nfiles may be stored. In sandboxed/containerized setups, this directory is generally\nmounted read-only. A number of special purpose virtual file systems might be mounted\nbelow this directory.\n\n/sys/fs/cgroup/\nA virtual kernel file system exposing process control groups (cgroups). This file system\nis an API to interface with the kernel and not a place where normal files may be stored.\nOn current systems running in the default \"unified\" mode, this directory serves as the\nmount point for the \"cgroup2\" filesystem, which provides a unified cgroup hierarchy for\nall resource controllers. On systems with non-default configurations, this directory may\ninstead be a tmpfs filesystem containing mount points for various \"cgroup\" (v1) resource\ncontrollers; in such configurations, if \"cgroup2\" is mounted it will be mounted on\n/sys/fs/cgroup/unified/, but cgroup2 will not have resource controllers attached. In\nsandboxed/containerized setups, this directory may either not exist or may include a\nsubset of functionality.\n\n### COMPATIBILITY SYMLINKS\n\n/bin/, /sbin/, /usr/sbin/\nThese compatibility symlinks point to /usr/bin/, ensuring that scripts and binaries\nreferencing these legacy paths correctly find their binaries.\n\n/lib/\nThis compatibility symlink points to /lib/, ensuring that programs referencing this\nlegacy path correctly find their resources.\n\n/lib64/\nOn some architecture ABIs, this compatibility symlink points to $libdir, ensuring that\nbinaries referencing this legacy path correctly find their dynamic loader. This symlink\nonly exists on architectures whose ABI places the dynamic loader in this path.\n\n/var/run/\nThis compatibility symlink points to /run/, ensuring that programs referencing this\nlegacy path correctly find their runtime data.\n\n### HOME DIRECTORY\n\nUser applications may want to place files and directories in the user's home directory. They\nshould follow the following basic structure. Note that some of these directories are also\nstandardized (though more weakly) by the XDG Base Directory Specification[2]. Additional\nlocations for high-level user resources are defined by xdg-user-dirs[3].\n\n~/.cache/\nPersistent user cache data. User programs may place non-essential data in this directory.\nFlushing this directory should have no effect on operation of programs, except for\nincreased runtimes necessary to rebuild these caches. If an application finds\n$XDGCACHEHOME set, it should use the directory specified in it instead of this\ndirectory.\n\n~/.config/\nApplication configuration and state. When a new user is created, this directory will be\nempty or not exist at all. Applications should fall back to defaults should their\nconfiguration or state in this directory be missing. If an application finds\n$XDGCONFIGHOME set, it should use the directory specified in it instead of this\ndirectory.\n\n~/.local/bin/\nExecutables that shall appear in the user's $PATH search path. It is recommended not to\nplace executables in this directory that are not useful for invocation from a shell;\nthese should be placed in a subdirectory of ~/.local/lib/ instead. Care should be taken\nwhen placing architecture-dependent binaries in this place, which might be problematic if\nthe home directory is shared between multiple hosts with different architectures.\n\n~/.local/lib/\nStatic, private vendor data that is compatible with all architectures.\n\n~/.local/lib/arch-id/\nLocation for placing public dynamic libraries. The architecture identifier to use is\ndefined on Multiarch Architecture Specifiers (Tuples)[6] list.\n\n~/.local/share/\nResources shared between multiple packages, such as fonts or artwork. Usually, the\nprecise location and format of files stored below this directory is subject to\nspecifications that ensure interoperability. If an application finds $XDGDATAHOME set,\nit should use the directory specified in it instead of this directory.\n\n### UNPRIVILEGED WRITE ACCESS\n\nUnprivileged processes generally lack write access to most of the hierarchy.\n\nThe exceptions for normal users are /tmp/, /var/tmp/, /dev/shm/, as well as the home\ndirectory $HOME (usually found below /home/) and the runtime directory $XDGRUNTIMEDIR\n(found below /run/user/) of the user, which are all writable.\n\nFor unprivileged system processes, only /tmp/, /var/tmp/ and /dev/shm/ are writable. If an\nunprivileged system process needs a private writable directory in /var/ or /run/, it is\nrecommended to either create it before dropping privileges in the daemon code, to create it\nvia tmpfiles.d(5) fragments during boot, or via the StateDirectory= and RuntimeDirectory=\ndirectives of service units (see systemd.unit(5) for details).\n\n/tmp/, /var/tmp/ and /dev/shm/ should be mounted nosuid and nodev, which means that\nset-user-id mode and character or block special devices are not interpreted on those file\nsystems. In general it is not possible to mount them noexec, because various programs use\nthose directories for dynamically generated or optimized code, and with that flag those use\ncases would break. Using this flag is OK on special-purpose installations or systems where\nall software that may be installed is known and doesn't require such functionality. See the\ndiscussion of nosuid/nodev/noexec in mount(8) and PROTEXEC in mmap(2).\n\n### NODE TYPES\n\nUnix file systems support different types of file nodes, including regular files,\ndirectories, symlinks, character and block device nodes, sockets and FIFOs.\n\nIt is strongly recommended that /dev/ is the only location below which device nodes shall be\nplaced. Similarly, /run/ shall be the only location to place sockets and FIFOs. Regular\nfiles, directories and symlinks may be used in all directories.\n\n### SYSTEM PACKAGES\n\nDevelopers of system packages should follow strict rules when placing their files in the file\nsystem. The following table lists recommended locations for specific types of files supplied\nby the vendor.\n\n#### Table 1. System package vendor files locations\n\n┌──────────────────────┬───────────────────────────────────┐\n│Directory             │ Purpose                           │\n├──────────────────────┼───────────────────────────────────┤\n│/usr/bin/             │ Package executables that shall    │\n│                      │ appear in the $PATH executable    │\n│                      │ search path, compiled for any of  │\n│                      │ the supported architectures       │\n│                      │ compatible with the operating     │\n│                      │ system. It is not recommended to  │\n│                      │ place internal binaries or        │\n│                      │ binaries that are not commonly    │\n│                      │ invoked from the shell in this    │\n│                      │ directory, such as daemon         │\n│                      │ binaries. As this directory is    │\n│                      │ shared with most other packages   │\n│                      │ of the system, special care       │\n│                      │ should be taken to pick unique    │\n│                      │ names for files placed here, that │\n│                      │ are unlikely to clash with other  │\n│                      │ package's files.                  │\n├──────────────────────┼───────────────────────────────────┤\n│/lib/arch-id/         │ Public shared libraries of the    │\n│                      │ package. As above, be careful     │\n│                      │ with using too generic names, and │\n│                      │ pick unique names for your        │\n│                      │ libraries to place here to avoid  │\n│                      │ name clashes.                     │\n├──────────────────────┼───────────────────────────────────┤\n│/lib/package/         │ Private static vendor resources   │\n│                      │ of the package, including private │\n│                      │ binaries and libraries, or any    │\n│                      │ other kind of read-only vendor    │\n│                      │ data.                             │\n├──────────────────────┼───────────────────────────────────┤\n│/lib/arch-id/package/ │ Private other vendor resources of │\n│                      │ the package that are              │\n│                      │ architecture-specific and cannot  │\n│                      │ be shared between architectures.  │\n│                      │ Note that this generally does not │\n│                      │ include private executables since │\n│                      │ binaries of a specific            │\n│                      │ architecture may be freely        │\n│                      │ invoked from any other supported  │\n│                      │ system architecture.              │\n├──────────────────────┼───────────────────────────────────┤\n│/usr/include/package/ │ Public C/C++ APIs of public       │\n│                      │ shared libraries of the package.  │\n└──────────────────────┴───────────────────────────────────┘\n\nAdditional static vendor files may be installed in the /usr/share/ hierarchy to the locations\ndefined by the various relevant specifications.\n\nThe following directories shall be used by the package for local configuration and files\ncreated during runtime:\n\n#### Table 2. System package variable files locations\n\n┌────────────────────┬───────────────────────────────────┐\n│Directory           │ Purpose                           │\n├────────────────────┼───────────────────────────────────┤\n│/etc/package/       │ System-specific configuration for │\n│                    │ the package. It is recommended to │\n│                    │ default to safe fallbacks if this │\n│                    │ configuration is missing, if this │\n│                    │ is possible. Alternatively, a     │\n│                    │ tmpfiles.d(5) fragment may be     │\n│                    │ used to copy or symlink the       │\n│                    │ necessary files and directories   │\n│                    │ from /usr/share/factory/ during   │\n│                    │ boot, via the \"L\" or \"C\"          │\n│                    │ directives.                       │\n├────────────────────┼───────────────────────────────────┤\n│/run/package/       │ Runtime data for the package.     │\n│                    │ Packages must be able to create   │\n│                    │ the necessary subdirectories in   │\n│                    │ this tree on their own, since the │\n│                    │ directory is flushed              │\n│                    │ automatically on boot.            │\n│                    │ Alternatively, a tmpfiles.d(5)    │\n│                    │ fragment may be used to create    │\n│                    │ the necessary directories during  │\n│                    │ boot, or the RuntimeDirectory=    │\n│                    │ directive of service units may be │\n│                    │ used to create them at service    │\n│                    │ startup (see systemd.unit(5) for  │\n│                    │ details).                         │\n├────────────────────┼───────────────────────────────────┤\n│/run/log/package/   │ Runtime log data for the package. │\n│                    │ As above, the package needs to    │\n│                    │ make sure to create this          │\n│                    │ directory if necessary, as it     │\n│                    │ will be flushed on every boot.    │\n├────────────────────┼───────────────────────────────────┤\n│/var/cache/package/ │ Persistent cache data of the      │\n│                    │ package. If this directory is     │\n│                    │ flushed, the application should   │\n│                    │ work correctly on next            │\n│                    │ invocation, though possibly       │\n│                    │ slowed down due to the need to    │\n│                    │ rebuild any local cache files.    │\n│                    │ The application must be capable   │\n│                    │ of recreating this directory      │\n│                    │ should it be missing and          │\n│                    │ necessary. To create an empty     │\n│                    │ directory, a tmpfiles.d(5)        │\n│                    │ fragment or the CacheDirectory=   │\n│                    │ directive of service units (see   │\n│                    │ systemd.unit(5)) may be used.     │\n├────────────────────┼───────────────────────────────────┤\n│/var/lib/package/   │ Persistent private data of the    │\n│                    │ package. This is the primary      │\n│                    │ place to put persistent data that │\n│                    │ does not fall into the other      │\n│                    │ categories listed. Packages       │\n│                    │ should be able to create the      │\n│                    │ necessary subdirectories in this  │\n│                    │ tree on their own, since the      │\n│                    │ directory might be missing on     │\n│                    │ boot. To create an empty          │\n│                    │ directory, a tmpfiles.d(5)        │\n│                    │ fragment or the StateDirectory=   │\n│                    │ directive of service units (see   │\n│                    │ systemd.unit(5)) may be used.     │\n├────────────────────┼───────────────────────────────────┤\n│/var/log/package/   │ Persistent log data of the        │\n│                    │ package. As above, the package    │\n│                    │ should make sure to create this   │\n│                    │ directory if necessary, possibly  │\n│                    │ using tmpfiles.d(5) or            │\n│                    │ LogsDirectory= (see               │\n│                    │ systemd.unit(5)), as it might be  │\n│                    │ missing.                          │\n├────────────────────┼───────────────────────────────────┤\n│/var/spool/package/ │ Persistent spool/queue data of    │\n│                    │ the package. As above, the        │\n│                    │ package should make sure to       │\n│                    │ create this directory if          │\n│                    │ necessary, as it might be         │\n│                    │ missing.                          │\n└────────────────────┴───────────────────────────────────┘\n\n### USER PACKAGES\n\nPrograms running in user context should follow strict rules when placing their own files in\nthe user's home directory. The following table lists recommended locations in the home\ndirectory for specific types of files supplied by the vendor if the application is installed\nin the home directory. (User applications installed system-wide are covered by the rules\noutlined above for vendor files.)\n\n#### Table 3. Vendor package file locations under the home directory of the user\n\n┌──────────────────────────────┬───────────────────────────────────┐\n│Directory                     │ Purpose                           │\n├──────────────────────────────┼───────────────────────────────────┤\n│~/.local/bin/                 │ Package executables that shall    │\n│                              │ appear in the $PATH executable    │\n│                              │ search path. It is not            │\n│                              │ recommended to place internal     │\n│                              │ executables or executables that   │\n│                              │ are not commonly invoked from the │\n│                              │ shell in this directory, such as  │\n│                              │ daemon executables. As this       │\n│                              │ directory is shared with most     │\n│                              │ other packages of the user,       │\n│                              │ special care should be taken to   │\n│                              │ pick unique names for files       │\n│                              │ placed here, that are unlikely to │\n│                              │ clash with other package's files. │\n├──────────────────────────────┼───────────────────────────────────┤\n│~/.local/lib/arch-id/         │ Public shared libraries of the    │\n│                              │ package. As above, be careful     │\n│                              │ with using overly generic names,  │\n│                              │ and pick unique names for your    │\n│                              │ libraries to place here to avoid  │\n│                              │ name clashes.                     │\n├──────────────────────────────┼───────────────────────────────────┤\n│~/.local/lib/package/         │ Private, static vendor resources  │\n│                              │ of the package, compatible with   │\n│                              │ any architecture, or any other    │\n│                              │ kind of read-only vendor data.    │\n├──────────────────────────────┼───────────────────────────────────┤\n│~/.local/lib/arch-id/package/ │ Private other vendor resources of │\n│                              │ the package that are              │\n│                              │ architecture-specific and cannot  │\n│                              │ be shared between architectures.  │\n└──────────────────────────────┴───────────────────────────────────┘\n\nAdditional static vendor files may be installed in the ~/.local/share/ hierarchy, mirroring\nthe subdirectories specified in the section \"Vendor-supplied operating system resources\"\nabove.\n\nThe following directories shall be used by the package for per-user local configuration and\nfiles created during runtime:\n\n#### Table 4. User package variable file locations\n\n┌──────────────────────────┬─────────────────────────────────┐\n│Directory                 │ Purpose                         │\n├──────────────────────────┼─────────────────────────────────┤\n│~/.config/package/        │ User-specific configuration and │\n│                          │ state for the package. It is    │\n│                          │ required to default to safe     │\n│                          │ fallbacks if this configuration │\n│                          │ is missing.                     │\n├──────────────────────────┼─────────────────────────────────┤\n│$XDGRUNTIMEDIR/package/ │ User runtime data for the       │\n│                          │ package.                        │\n├──────────────────────────┼─────────────────────────────────┤\n│~/.cache/package/         │ Persistent cache data of the    │\n│                          │ package. If this directory is   │\n│                          │ flushed, the application should │\n│                          │ work correctly on next          │\n│                          │ invocation, though possibly     │\n│                          │ slowed down due to the need to  │\n│                          │ rebuild any local cache files.  │\n│                          │ The application must be capable │\n│                          │ of recreating this directory    │\n│                          │ should it be missing and        │\n│                          │ necessary.                      │\n└──────────────────────────┴─────────────────────────────────┘\n\n### SEE ALSO\n\nsystemd(1), hier(7), systemd-path(1), systemd-gpt-auto-generator(8), sysctl.d(5),\ntmpfiles.d(5), pkg-config(1), systemd.unit(5)\n\n### NOTES\n\n1. File System Hierarchy\nhttp://refspecs.linuxfoundation.org/FHS3.0/fhs-3.0.html\n\n2. XDG Base Directory Specification\nhttp://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html\n\n3. XDG User Directories\nhttps://www.freedesktop.org/wiki/Software/xdg-user-dirs/\n\n4. IEEE Std 1003.1\nhttp://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1chap08.html#tag0803\n\n5. Using /tmp/ and /var/tmp/ Safely\nhttps://systemd.io/TEMPORARYDIRECTORIES\n\n6. Multiarch Architecture Specifiers (Tuples)\nhttps://wiki.debian.org/Multiarch/Tuples\n\n\n\nsystemd 249                                                                        FILE-HIERARCHY(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "file-hierarchy",
        "section": "7",
        "mode": "man",
        "summary": "file-hierarchy - File system hierarchy overview",
        "synopsis": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "hier",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/hier/7/json"
            },
            {
                "name": "systemd-path",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-path/1/json"
            },
            {
                "name": "systemd-gpt-auto-generator",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-gpt-auto-generator/8/json"
            },
            {
                "name": "sysctl.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/sysctl.d/5/json"
            },
            {
                "name": "tmpfiles.d",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/tmpfiles.d/5/json"
            },
            {
                "name": "pkg-config",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pkg-config/1/json"
            },
            {
                "name": "systemd.unit",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "GENERAL STRUCTURE",
                "lines": 58,
                "subsections": []
            },
            {
                "name": "RUNTIME DATA",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "VENDOR-SUPPLIED OPERATING SYSTEM RESOURCES",
                "lines": 48,
                "subsections": []
            },
            {
                "name": "PERSISTENT VARIABLE SYSTEM DATA",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "VIRTUAL KERNEL AND API FILE SYSTEMS",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "COMPATIBILITY SYMLINKS",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "HOME DIRECTORY",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "UNPRIVILEGED WRITE ACCESS",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "NODE TYPES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SYSTEM PACKAGES",
                "lines": 4,
                "subsections": [
                    {
                        "name": "Table 1. System package vendor files locations",
                        "lines": 55
                    },
                    {
                        "name": "Table 2. System package variable files locations",
                        "lines": 84
                    }
                ]
            },
            {
                "name": "USER PACKAGES",
                "lines": 6,
                "subsections": [
                    {
                        "name": "Table 3. Vendor package file locations under the home directory of the user",
                        "lines": 43
                    },
                    {
                        "name": "Table 4. User package variable file locations",
                        "lines": 25
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 21,
                "subsections": []
            }
        ]
    }
}