X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=man%2Ffile-hierarchy.xml;h=9d96cff007d3b143476ea75da8b33824c34d103a;hp=f8694a4c0aa3f2aa75a8a7abe1ffee833500d426;hb=06b643e7f5a3b79005dd57497897ab7255fe3659;hpb=959ddb4700bbc1f70418a8c59a6eb7cb9a626b4f diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml index f8694a4c0..9d96cff00 100644 --- a/man/file-hierarchy.xml +++ b/man/file-hierarchy.xml @@ -57,11 +57,16 @@ specifically the hierarchy described in the File System Hierarchy specification and - hier7. This + hier7. 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. + + Many of the paths described here are queriable + with the + systemd-path1 + tool. @@ -84,7 +89,7 @@ used for bringing up the system. On EFI systems this is possibly the EFI System Partition, also see - systemd-boot-generator8. This + systemd-efi-boot-generator8. This directory is usually strictly local to the host, and should be considered read-only, except when a new kernel or @@ -173,8 +178,8 @@ accessible to other users of the system it is essential that this directory is only written to with the - mkstemp3, - mkdtemp3 + mkstemp3, + mkdtemp3 and related calls. This directory is usually flushed at boot-up. Also, files that are not accessed within a @@ -185,7 +190,9 @@ should prefer using the directory specified in it over directly referencing - /tmp (see environ7 for details). + /tmp (see environ7 + and + IEEE Std 1003.1 for details). @@ -294,24 +301,25 @@ - $libdir + /usr/lib/arch-id Location for placing - dynamic libraries. The precise - location depends on the operating - system and the architecture, and is - sometimes + dynamic libraries, also called $libdir. + The architecture identifier to use is defined on Multiarch Architecture Specifiers (Tuples) + list. Legacy locations of $libdir are /usr/lib, - /use/lib64 or - /usr/lib/ - suffixed by an architecture - identifier. This directory should not + /usr/lib64. + This directory should not be used for package-specific data, unless this data is architecture-dependent, too. To query $libdir for the primary architecture of the system, - invoke - # pkg-config --variable=libdir systemd + invoke: + # pkg-config --variable=libdir systemd or + # systemd-path system-library-arch + + @@ -416,7 +424,7 @@ private logs in this directory, though it is recommended to do most logging via the - syslog3 + syslog3 and sd_journal_print3 calls. @@ -446,8 +454,8 @@ restrictions as with /tmp apply, and hence only - mkstemp3, - mkdtemp3 + mkstemp3, + mkdtemp3 or similar calls should be used to make use of this directory. If applications find the environment @@ -455,7 +463,8 @@ set they should prefer using the directory specified in it over directly referencing - /var/tmp (see environ7 for details). + /var/tmp (see environ7 + for details). @@ -518,7 +527,7 @@ is mostly an API to interface with the kernel and not a place where normal files may be stored. For details, see - proc5. A + proc5. A number of special purpose virtual file systems might be mounted below this directory. @@ -623,7 +632,10 @@ of these directories are also standardized (though more weakly) by the XDG - Base Directory Specification. + Base Directory Specification. Additional + locations for high-level user resources are defined by + xdg-user-dirs. @@ -694,7 +706,7 @@ Location for placing public dynamic libraries. The architecture - identifier to use is defined on Multiarch Architecture Specifiers (Tuples) list. @@ -721,9 +733,9 @@ - Unpriviliged Write Access + Unprivileged Write Access - Unpriviliged processes generally lack + Unprivileged processes generally lack write access to most of the hierarchy. The exceptions for normal users are @@ -736,14 +748,14 @@ below /run/user) of the user, which are all writable. - For unpriviliged system processes only + For unprivileged system processes only /tmp, /var/tmp and /dev/shm are writable. If an - unpriviliged system process needs a private, writable + unprivileged system process needs a private, writable directory in /var or /run, 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 tmpfiles.d5 fragments during boot, or via the @@ -792,10 +804,10 @@ /usr/bin - Package executables that shall appear in the $PATH 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. + Package executables that shall appear in the $PATH 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. - $libdir + /usr/lib/arch-id 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. @@ -803,8 +815,8 @@ Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data. - $libdir/package - 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. + /usr/lib/arch-id/package + 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. /usr/include/package @@ -902,7 +914,7 @@ ~/.local/lib/package - Private, static vendor resources of the package, compatible wih any architecture, or any other kind of read-only vendor data. + Private, static vendor resources of the package, compatible with any architecture, or any other kind of read-only vendor data. ~/.local/lib/arch-id/package @@ -953,11 +965,12 @@ See Also systemd1, - hier7, - systemd-boot-generator8, + hier7, + systemd-path1, + systemd-efi-boot-generator8, sysctl.d5, tmpfiles.d5, - pkg-config1, + pkg-config1, systemd.unit5