{
    "mode": "man",
    "parameter": "systemd.exec",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/systemd.exec/5/json",
    "generated": "2026-10-09T17:32:59Z",
    "synopsis": "service.service, socket.socket, mount.mount, swap.swap",
    "sections": {
        "NAME": {
            "content": "systemd.exec - Execution environment configuration\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "service.service, socket.socket, mount.mount, swap.swap\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Unit configuration files for services, sockets, mount points, and swap devices share a subset\nof configuration options which define the execution environment of spawned processes.\n\nThis man page lists the configuration options shared by these four unit types. See\nsystemd.unit(5) for the common options of all unit configuration files, and\nsystemd.service(5), systemd.socket(5), systemd.swap(5), and systemd.mount(5) for more\ninformation on the specific unit configuration files. The execution specific configuration\noptions are configured in the [Service], [Socket], [Mount], or [Swap] sections, depending on\nthe unit type.\n\nIn addition, options which control resources through Linux Control Groups (cgroups) are\nlisted in systemd.resource-control(5). Those options complement options listed here.\n",
            "subsections": []
        },
        "IMPLICIT DEPENDENCIES": {
            "content": "A few execution parameters result in additional, automatic dependencies to be added:\n\n•   Units with WorkingDirectory=, RootDirectory=, RootImage=, RuntimeDirectory=,\nStateDirectory=, CacheDirectory=, LogsDirectory= or ConfigurationDirectory= set\nautomatically gain dependencies of type Requires= and After= on all mount units required\nto access the specified paths. This is equivalent to having them listed explicitly in\nRequiresMountsFor=.\n\n•   Similarly, units with PrivateTmp= enabled automatically get mount unit dependencies for\nall mounts required to access /tmp/ and /var/tmp/. They will also gain an automatic\nAfter= dependency on systemd-tmpfiles-setup.service(8).\n\n•   Units whose standard output or error output is connected to journal or kmsg (or their\ncombinations with console output, see below) automatically acquire dependencies of type\nAfter= on systemd-journald.socket.\n\n•   Units using LogNamespace= will automatically gain ordering and requirement dependencies\non the two socket units associated with systemd-journald@.service instances.\n",
            "subsections": []
        },
        "PATHS": {
            "content": "The following settings may be used to change a service's view of the filesystem. Please note\nthat the paths must be absolute and must not contain a \"..\"  path component.\n\nExecSearchPath=\nTakes a colon separated list of absolute paths relative to which the executable used by\nthe Exec*= (e.g.  ExecStart=, ExecStop=, etc.) properties can be found.  ExecSearchPath=\noverrides $PATH if $PATH is not supplied by the user through Environment=,\nEnvironmentFile= or PassEnvironment=. Assigning an empty string removes previous\nassignments and setting ExecSearchPath= to a value multiple times will append to the\nprevious setting.\n\nAdded in version 250.\n\nWorkingDirectory=\nTakes a directory path relative to the service's root directory specified by\nRootDirectory=, or the special value \"~\". Sets the working directory for executed\nprocesses. If set to \"~\", the home directory of the user specified in User= is used. If\nnot set, defaults to the root directory when systemd is running as a system instance and\nthe respective user's home directory if run as user. If the setting is prefixed with the\n\"-\" character, a missing working directory is not considered fatal. If\nRootDirectory=/RootImage= is not set, then WorkingDirectory= is relative to the root of\nthe system running the service manager. Note that setting this parameter might result in\nadditional dependencies to be added to the unit (see above).\n\nRootDirectory=\nTakes a directory path relative to the host's root directory (i.e. the root of the system\nrunning the service manager). Sets the root directory for executed processes, with the\nchroot(2) system call. If this is used, it must be ensured that the process binary and\nall its auxiliary files are available in the chroot() jail. Note that setting this\nparameter might result in additional dependencies to be added to the unit (see above).\n\nThe MountAPIVFS= and PrivateUsers= settings are particularly useful in conjunction with\nRootDirectory=. For details, see below.\n\nIf RootDirectory=/RootImage= are used together with NotifyAccess= the notification socket\nis automatically mounted from the host into the root environment, to ensure the\nnotification interface can work correctly.\n\nNote that services using RootDirectory=/RootImage= will not be able to log via the syslog\nor journal protocols to the host logging infrastructure, unless the relevant sockets are\nmounted from the host, specifically:\n\nThe host's os-release(5) file will be made available for the service (read-only) as\n/run/host/os-release. It will be updated automatically on soft reboot (see: systemd-soft-\nreboot.service(8)), in case the service is configured to survive it.\n\nExample 1. Mounting logging sockets into root environment\n\nBindReadOnlyPaths=/dev/log /run/systemd/journal/socket /run/systemd/journal/stdout\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nRootImage=\nTakes a path to a block device node or regular file as argument. This call is similar to\nRootDirectory= however mounts a file system hierarchy from a block device node or\nloopback file instead of a directory. The device node or file system image file needs to\ncontain a file system without a partition table, or a file system within an MBR/MS-DOS or\nGPT partition table with only a single Linux-compatible partition, or a set of file\nsystems within a GPT partition table that follows the Discoverable Partitions\nSpecification[1].\n\nWhen DevicePolicy= is set to \"closed\" or \"strict\", or set to \"auto\" and DeviceAllow= is\nset, then this setting adds /dev/loop-control with rw mode, \"block-loop\" and\n\"block-blkext\" with rwm mode to DeviceAllow=. See systemd.resource-control(5) for the\ndetails about DevicePolicy= or DeviceAllow=. Also, see PrivateDevices= below, as it may\nchange the setting of DevicePolicy=.\n\nUnits making use of RootImage= automatically gain an After= dependency on\nsystemd-udevd.service.\n\nThe host's os-release(5) file will be made available for the service (read-only) as\n/run/host/os-release. It will be updated automatically on soft reboot (see: systemd-soft-\nreboot.service(8)), in case the service is configured to survive it.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 233.\n\nRootImageOptions=\nTakes a comma-separated list of mount options that will be used on disk images specified\nby RootImage=. Optionally a partition name can be prefixed, followed by colon, in case\nthe image has multiple partitions, otherwise partition name \"root\" is implied. Options\nfor multiple partitions can be specified in a single line with space separators.\nAssigning an empty string removes previous assignments. Duplicated options are ignored.\nFor a list of valid mount options, please refer to mount(8).\n\nValid partition names follow the Discoverable Partitions Specification[1]: root, usr,\nhome, srv, esp, xbootldr, tmp, var.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 247.\n\nRootEphemeral=\nTakes a boolean argument. If enabled, executed processes will run in an ephemeral copy of\nthe root directory or root image. The ephemeral copy is placed in\n/var/lib/systemd/ephemeral-trees/ while the service is active and is cleaned up when the\nservice is stopped or restarted. If RootDirectory= is used and the root directory is a\nsubvolume, the ephemeral copy will be created by making a snapshot of the subvolume.\n\nTo make sure making ephemeral copies can be made efficiently, the root directory or root\nimage should be located on the same filesystem as /var/lib/systemd/ephemeral-trees/. When\nusing RootEphemeral= with root directories, btrfs(5) should be used as the filesystem and\nthe root directory should ideally be a subvolume which systemd can snapshot to make the\nephemeral copy. For root images, a filesystem with support for reflinks should be used to\nensure an efficient ephemeral copy.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 254.\n\nRootHash=\nTakes a data integrity (dm-verity) root hash specified in hexadecimal, or the path to a\nfile containing a root hash in ASCII hexadecimal format. This option enables data\nintegrity checks using dm-verity, if the used image contains the appropriate integrity\ndata (see above) or if RootVerity= is used. The specified hash must match the root hash\nof integrity data, and is usually at least 256 bits (and hence 64 formatted hexadecimal\ncharacters) long (in case of SHA256 for example). If this option is not specified, but\nthe image file carries the \"user.verity.roothash\" extended file attribute (see xattr(7)),\nthen the root hash is read from it, also as formatted hexadecimal characters. If the\nextended file attribute is not found (or is not supported by the underlying file system),\nbut a file with the .roothash suffix is found next to the image file, bearing otherwise\nthe same name (except if the image has the .raw suffix, in which case the root hash file\nmust not have it in its name), the root hash is read from it and automatically used, also\nas formatted hexadecimal characters.\n\nIf the disk image contains a separate /usr/ partition it may also be Verity protected, in\nwhich case the root hash may configured via an extended attribute \"user.verity.usrhash\"\nor a .usrhash file adjacent to the disk image. There's currently no option to configure\nthe root hash for the /usr/ file system via the unit file directly.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 246.\n\nRootHashSignature=\nTakes a PKCS7 signature of the RootHash= option as a path to a DER-encoded signature\nfile, or as an ASCII base64 string encoding of a DER-encoded signature prefixed by\n\"base64:\". The dm-verity volume will only be opened if the signature of the root hash is\nvalid and signed by a public key present in the kernel keyring. If this option is not\nspecified, but a file with the .roothash.p7s suffix is found next to the image file,\nbearing otherwise the same name (except if the image has the .raw suffix, in which case\nthe signature file must not have it in its name), the signature is read from it and\nautomatically used.\n\nIf the disk image contains a separate /usr/ partition it may also be Verity protected, in\nwhich case the signature for the root hash may configured via a .usrhash.p7s file\nadjacent to the disk image. There's currently no option to configure the root hash\nsignature for the /usr/ via the unit file directly.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 246.\n\nRootVerity=\nTakes the path to a data integrity (dm-verity) file. This option enables data integrity\nchecks using dm-verity, if RootImage= is used and a root-hash is passed and if the used\nimage itself does not contain the integrity data. The integrity data must be matched by\nthe root hash. If this option is not specified, but a file with the .verity suffix is\nfound next to the image file, bearing otherwise the same name (except if the image has\nthe .raw suffix, in which case the verity data file must not have it in its name), the\nverity data is read from it and automatically used.\n\nThis option is supported only for disk images that contain a single file system, without\nan enveloping partition table. Images that contain a GPT partition table should instead\ninclude both root file system and matching Verity data in the same image, implementing\nthe Discoverable Partitions Specification[1].\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 246.\n\nRootImagePolicy=, MountImagePolicy=, ExtensionImagePolicy=\nTakes an image policy string as per systemd.image-policy(7) to use when mounting the disk\nimages (DDI) specified in RootImage=, MountImage=, ExtensionImage=, respectively. If not\nspecified the following policy string is the default for RootImagePolicy= and\nMountImagePolicy:\n\nroot=verity+signed+encrypted+unprotected+absent: \\\nusr=verity+signed+encrypted+unprotected+absent: \\\nhome=encrypted+unprotected+absent: \\\nsrv=encrypted+unprotected+absent: \\\ntmp=encrypted+unprotected+absent: \\\nvar=encrypted+unprotected+absent\n\nThe default policy for ExtensionImagePolicy= is:\n\nroot=verity+signed+encrypted+unprotected+absent: \\\nusr=verity+signed+encrypted+unprotected+absent\n\nAdded in version 254.\n\nMountAPIVFS=\nTakes a boolean argument. If on, a private mount namespace for the unit's processes is\ncreated and the API file systems /proc/, /sys/, /dev/ and /run/ (as an empty \"tmpfs\") are\nmounted inside of it, unless they are already mounted. Note that this option has no\neffect unless used in conjunction with RootDirectory=/RootImage= as these four mounts are\ngenerally mounted in the host anyway, and unless the root directory is changed, the\nprivate mount namespace will be a 1:1 copy of the host's, and include these four mounts.\nNote that the /dev/ file system of the host is bind mounted if this option is used\nwithout PrivateDevices=. To run the service with a private, minimal version of /dev/,\ncombine this option with PrivateDevices=.\n\nIn order to allow propagating mounts at runtime in a safe manner, /run/systemd/propagate/\non the host will be used to set up new mounts, and /run/host/incoming/ in the private\nnamespace will be used as an intermediate step to store them before being moved to the\nfinal mount point.\n\nAdded in version 233.\n\nProtectProc=\nTakes one of \"noaccess\", \"invisible\", \"ptraceable\" or \"default\" (which it defaults to).\nWhen set, this controls the \"hidepid=\" mount option of the \"procfs\" instance for the unit\nthat controls which directories with process metainformation (/proc/PID) are visible and\naccessible: when set to \"noaccess\" the ability to access most of other users' process\nmetadata in /proc/ is taken away for processes of the service. When set to \"invisible\"\nprocesses owned by other users are hidden from /proc/. If \"ptraceable\" all processes that\ncannot be ptrace()'ed by a process are hidden to it. If \"default\" no restrictions on\n/proc/ access or visibility are made. For further details see The /proc Filesystem[2]. It\nis generally recommended to run most system services with this option set to \"invisible\".\nThis option is implemented via file system namespacing, and thus cannot be used with\nservices that shall be able to install mount points in the host file system hierarchy.\nNote that the root user is unaffected by this option, so to be effective it has to be\nused together with User= or DynamicUser=yes, and also without the \"CAPSYSPTRACE\"\ncapability, which also allows a process to bypass this feature. It cannot be used for\nservices that need to access metainformation about other users' processes. This option\nimplies MountAPIVFS=.\n\nIf the kernel doesn't support per-mount point hidepid= mount options this setting remains\nwithout effect, and the unit's processes will be able to access and see other process as\nif the option was not used.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 247.\n\nProcSubset=\nTakes one of \"all\" (the default) and \"pid\". If \"pid\", all files and directories not\ndirectly associated with process management and introspection are made invisible in the\n/proc/ file system configured for the unit's processes. This controls the \"subset=\" mount\noption of the \"procfs\" instance for the unit. For further details see The /proc\nFilesystem[2]. Note that Linux exposes various kernel APIs via /proc/, which are made\nunavailable with this setting. Since these APIs are used frequently this option is useful\nonly in a few, specific cases, and is not suitable for most non-trivial programs.\n\nMuch like ProtectProc= above, this is implemented via file system mount namespacing, and\nhence the same restrictions apply: it is only available to system services, it disables\nmount propagation to the host mount table, and it implies MountAPIVFS=. Also, like\nProtectProc= this setting is gracefully disabled if the used kernel does not support the\n\"subset=\" mount option of \"procfs\".\n\nAdded in version 247.\n\nBindPaths=, BindReadOnlyPaths=\nConfigures unit-specific bind mounts. A bind mount makes a particular file or directory\navailable at an additional place in the unit's view of the file system. Any bind mounts\ncreated with this option are specific to the unit, and are not visible in the host's\nmount table. This option expects a whitespace separated list of bind mount definitions.\nEach definition consists of a colon-separated triple of source path, destination path and\noption string, where the latter two are optional. If only a source path is specified the\nsource and destination is taken to be the same. The option string may be either \"rbind\"\nor \"norbind\" for configuring a recursive or non-recursive bind mount. If the destination\npath is omitted, the option string must be omitted too. Each bind mount definition may be\nprefixed with \"-\", in which case it will be ignored when its source path does not exist.\n\nBindPaths= creates regular writable bind mounts (unless the source file system mount is\nalready marked read-only), while BindReadOnlyPaths= creates read-only bind mounts. These\nsettings may be used more than once, each usage appends to the unit's list of bind\nmounts. If the empty string is assigned to either of these two options the entire list of\nbind mounts defined prior to this is reset. Note that in this case both read-only and\nregular bind mounts are reset, regardless which of the two settings is used.\n\nThis option is particularly useful when RootDirectory=/RootImage= is used. In this case\nthe source path refers to a path on the host file system, while the destination path\nrefers to a path below the root directory of the unit.\n\nNote that the destination directory must exist or systemd must be able to create it.\nThus, it is not possible to use those options for mount points nested underneath paths\nspecified in InaccessiblePaths=, or under /home/ and other protected directories if\nProtectHome=yes is specified.  TemporaryFileSystem= with \":ro\" or ProtectHome=tmpfs\nshould be used instead.\n\nAdded in version 233.\n\nMountImages=\nThis setting is similar to RootImage= in that it mounts a file system hierarchy from a\nblock device node or loopback file, but the destination directory can be specified as\nwell as mount options. This option expects a whitespace separated list of mount\ndefinitions. Each definition consists of a colon-separated tuple of source path and\ndestination definitions, optionally followed by another colon and a list of mount\noptions.\n\nMount options may be defined as a single comma-separated list of options, in which case\nthey will be implicitly applied to the root partition on the image, or a series of\ncolon-separated tuples of partition name and mount options. Valid partition names and\nmount options are the same as for RootImageOptions= setting described above.\n\nEach mount definition may be prefixed with \"-\", in which case it will be ignored when its\nsource path does not exist. The source argument is a path to a block device node or\nregular file. If source or destination contain a \":\", it needs to be escaped as \"\\:\". The\ndevice node or file system image file needs to follow the same rules as specified for\nRootImage=. Any mounts created with this option are specific to the unit, and are not\nvisible in the host's mount table.\n\nThese settings may be used more than once, each usage appends to the unit's list of mount\npaths. If the empty string is assigned, the entire list of mount paths defined prior to\nthis is reset.\n\nNote that the destination directory must exist or systemd must be able to create it.\nThus, it is not possible to use those options for mount points nested underneath paths\nspecified in InaccessiblePaths=, or under /home/ and other protected directories if\nProtectHome=yes is specified.\n\nWhen DevicePolicy= is set to \"closed\" or \"strict\", or set to \"auto\" and DeviceAllow= is\nset, then this setting adds /dev/loop-control with rw mode, \"block-loop\" and\n\"block-blkext\" with rwm mode to DeviceAllow=. See systemd.resource-control(5) for the\ndetails about DevicePolicy= or DeviceAllow=. Also, see PrivateDevices= below, as it may\nchange the setting of DevicePolicy=.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 247.\n\nExtensionImages=\nThis setting is similar to MountImages= in that it mounts a file system hierarchy from a\nblock device node or loopback file, but instead of providing a destination path, an\noverlay will be set up. This option expects a whitespace separated list of mount\ndefinitions. Each definition consists of a source path, optionally followed by a colon\nand a list of mount options.\n\nA read-only OverlayFS will be set up on top of /usr/ and /opt/ hierarchies for sysext\nimages and /etc/ hierarchy for confext images. The order in which the images are listed\nwill determine the order in which the overlay is laid down: images specified first to\nlast will result in overlayfs layers bottom to top.\n\nMount options may be defined as a single comma-separated list of options, in which case\nthey will be implicitly applied to the root partition on the image, or a series of\ncolon-separated tuples of partition name and mount options. Valid partition names and\nmount options are the same as for RootImageOptions= setting described above.\n\nEach mount definition may be prefixed with \"-\", in which case it will be ignored when its\nsource path does not exist. The source argument is a path to a block device node or\nregular file. If the source path contains a \":\", it needs to be escaped as \"\\:\". The\ndevice node or file system image file needs to follow the same rules as specified for\nRootImage=. Any mounts created with this option are specific to the unit, and are not\nvisible in the host's mount table.\n\nThese settings may be used more than once, each usage appends to the unit's list of image\npaths. If the empty string is assigned, the entire list of mount paths defined prior to\nthis is reset.\n\nEach sysext image must carry a /usr/lib/extension-release.d/extension-release.IMAGE file\nwhile each confext image must carry a /etc/extension-release.d/extension-release.IMAGE\nfile, with the appropriate metadata which matches RootImage=/RootDirectory= or the host.\nSee: os-release(5). To disable the safety check that the extension-release file name\nmatches the image file name, the x-systemd.relax-extension-release-check mount option may\nbe appended.\n\nWhen DevicePolicy= is set to \"closed\" or \"strict\", or set to \"auto\" and DeviceAllow= is\nset, then this setting adds /dev/loop-control with rw mode, \"block-loop\" and\n\"block-blkext\" with rwm mode to DeviceAllow=. See systemd.resource-control(5) for the\ndetails about DevicePolicy= or DeviceAllow=. Also, see PrivateDevices= below, as it may\nchange the setting of DevicePolicy=.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 248.\n\nExtensionDirectories=\nThis setting is similar to BindReadOnlyPaths= in that it mounts a file system hierarchy\nfrom a directory, but instead of providing a destination path, an overlay will be set up.\nThis option expects a whitespace separated list of source directories.\n\nA read-only OverlayFS will be set up on top of /usr/ and /opt/ hierarchies for sysext\nimages and /etc/ hierarchy for confext images. The order in which the directories are\nlisted will determine the order in which the overlay is laid down: directories specified\nfirst to last will result in overlayfs layers bottom to top.\n\nEach directory listed in ExtensionDirectories= may be prefixed with \"-\", in which case it\nwill be ignored when its source path does not exist. Any mounts created with this option\nare specific to the unit, and are not visible in the host's mount table.\n\nThese settings may be used more than once, each usage appends to the unit's list of\ndirectories paths. If the empty string is assigned, the entire list of mount paths\ndefined prior to this is reset.\n\nEach sysext directory must contain a /usr/lib/extension-release.d/extension-release.IMAGE\nfile while each confext directory must carry a\n/etc/extension-release.d/extension-release.IMAGE file, with the appropriate metadata\nwhich matches RootImage=/RootDirectory= or the host. See: os-release(5).\n\nNote that usage from user units requires overlayfs support in unprivileged user\nnamespaces, which was first introduced in kernel v5.11.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 251.\n",
            "subsections": []
        },
        "USER/GROUP IDENTITY": {
            "content": "These options are only available for system services and are not supported for services\nrunning in per-user instances of the service manager.\n\nUser=, Group=\nSet the UNIX user or group that the processes are executed as, respectively. Takes a\nsingle user or group name, or a numeric ID as argument. For system services (services run\nby the system service manager, i.e. managed by PID 1) and for user services of the root\nuser (services managed by root's instance of systemd --user), the default is \"root\", but\nUser= may be used to specify a different user. For user services of any other user,\nswitching user identity is not permitted, hence the only valid setting is the same user\nthe user's service manager is running as. If no group is set, the default group of the\nuser is used. This setting does not affect commands whose command line is prefixed with\n\"+\".\n\nNote that this enforces only weak restrictions on the user/group name syntax, but will\ngenerate warnings in many cases where user/group names do not adhere to the following\nrules: the specified name should consist only of the characters a-z, A-Z, 0-9, \"\" and\n\"-\", except for the first character which must be one of a-z, A-Z and \"\" (i.e. digits\nand \"-\" are not permitted as first character). The user/group name must have at least one\ncharacter, and at most 31. These restrictions are made in order to avoid ambiguities and\nto ensure user/group names and unit files remain portable among Linux systems. For\nfurther details on the names accepted and the names warned about see User/Group Name\nSyntax[3].\n\nWhen used in conjunction with DynamicUser= the user/group name specified is dynamically\nallocated at the time the service is started, and released at the time the service is\nstopped — unless it is already allocated statically (see below). If DynamicUser= is not\nused the specified user and group must have been created statically in the user database\nno later than the moment the service is started, for example using the sysusers.d(5)\nfacility, which is applied at boot or package install time. If the user does not exist by\nthen program invocation will fail.\n\nIf the User= setting is used the supplementary group list is initialized from the\nspecified user's default group list, as defined in the system's user and group database.\nAdditional groups may be configured through the SupplementaryGroups= setting (see below).\n\nDynamicUser=\nTakes a boolean parameter. If set, a UNIX user and group pair is allocated dynamically\nwhen the unit is started, and released as soon as it is stopped. The user and group will\nnot be added to /etc/passwd or /etc/group, but are managed transiently during runtime.\nThe nss-systemd(8) glibc NSS module provides integration of these dynamic users/groups\ninto the system's user and group databases. The user and group name to use may be\nconfigured via User= and Group= (see above). If these options are not used and dynamic\nuser/group allocation is enabled for a unit, the name of the dynamic user/group is\nimplicitly derived from the unit name. If the unit name without the type suffix qualifies\nas valid user name it is used directly, otherwise a name incorporating a hash of it is\nused. If a statically allocated user or group of the configured name already exists, it\nis used and no dynamic user/group is allocated. Note that if User= is specified and the\nstatic group with the name exists, then it is required that the static user with the name\nalready exists. Similarly, if Group= is specified and the static user with the name\nexists, then it is required that the static group with the name already exists. Dynamic\nusers/groups are allocated from the UID/GID range 61184...65519. It is recommended to\navoid this range for regular system or login users. At any point in time each UID/GID\nfrom this range is only assigned to zero or one dynamically allocated users/groups in\nuse. However, UID/GIDs are recycled after a unit is terminated. Care should be taken that\nany processes running as part of a unit for which dynamic users/groups are enabled do not\nleave files or directories owned by these users/groups around, as a different unit might\nget the same UID/GID assigned later on, and thus gain access to these files or\ndirectories. If DynamicUser= is enabled, RemoveIPC= and PrivateTmp= are implied (and\ncannot be turned off). This ensures that the lifetime of IPC objects and temporary files\ncreated by the executed processes is bound to the runtime of the service, and hence the\nlifetime of the dynamic user/group. Since /tmp/ and /var/tmp/ are usually the only\nworld-writable directories on a system this ensures that a unit making use of dynamic\nuser/group allocation cannot leave files around after unit termination. Furthermore\nNoNewPrivileges= and RestrictSUIDSGID= are implicitly enabled (and cannot be disabled),\nto ensure that processes invoked cannot take benefit or create SUID/SGID files or\ndirectories. Moreover ProtectSystem=strict and ProtectHome=read-only are implied, thus\nprohibiting the service to write to arbitrary file system locations. In order to allow\nthe service to write to certain directories, they have to be allow-listed using\nReadWritePaths=, but care must be taken so that UID/GID recycling doesn't create security\nissues involving files created by the service. Use RuntimeDirectory= (see below) in order\nto assign a writable runtime directory to a service, owned by the dynamic user/group and\nremoved automatically when the unit is terminated. Use StateDirectory=, CacheDirectory=\nand LogsDirectory= in order to assign a set of writable directories for specific purposes\nto the service in a way that they are protected from vulnerabilities due to UID reuse\n(see below). If this option is enabled, care should be taken that the unit's processes do\nnot get access to directories outside of these explicitly configured and managed ones.\nSpecifically, do not use BindPaths= and be careful with AFUNIX file descriptor passing\nfor directory file descriptors, as this would permit processes to create files or\ndirectories owned by the dynamic user/group that are not subject to the lifecycle and\naccess guarantees of the service. Note that this option is currently incompatible with\nD-Bus policies, thus a service using this option may currently not allocate a D-Bus\nservice name (note that this does not affect calling into other D-Bus services). Defaults\nto off.\n\nAdded in version 232.\n\nSupplementaryGroups=\nSets the supplementary Unix groups the processes are executed as. This takes a\nspace-separated list of group names or IDs. This option may be specified more than once,\nin which case all listed groups are set as supplementary groups. When the empty string is\nassigned, the list of supplementary groups is reset, and all assignments prior to this\none will have no effect. In any way, this option does not override, but extends the list\nof supplementary groups configured in the system group database for the user. This does\nnot affect commands prefixed with \"+\".\n\nSetLoginEnvironment=\nTakes a boolean parameter that controls whether to set $HOME, $LOGNAME, and $SHELL\nenvironment variables. If unset, this is controlled by whether User= is set. If true,\nthey will always be set for system services, i.e. even when the default user \"root\" is\nused. If false, the mentioned variables are not set by systemd, no matter whether User=\nis used or not. This option normally has no effect on user services, since these\nvariables are typically inherited from user manager's own environment anyway.\n\nAdded in version 255.\n\nPAMName=\nSets the PAM service name to set up a session as. If set, the executed process will be\nregistered as a PAM session under the specified service name. This is only useful in\nconjunction with the User= setting, and is otherwise ignored. If not set, no PAM session\nwill be opened for the executed processes. See pam(8) for details.\n\nNote that for each unit making use of this option a PAM session handler process will be\nmaintained as part of the unit and stays around as long as the unit is active, to ensure\nthat appropriate actions can be taken when the unit and hence the PAM session terminates.\nThis process is named \"(sd-pam)\" and is an immediate child process of the unit's main\nprocess.\n\nNote that when this option is used for a unit it is very likely (depending on PAM\nconfiguration) that the main unit process will be migrated to its own session scope unit\nwhen it is activated. This process will hence be associated with two units: the unit it\nwas originally started from (and for which PAMName= was configured), and the session\nscope unit. Any child processes of that process will however be associated with the\nsession scope unit only. This has implications when used in combination with\nNotifyAccess=all, as these child processes will not be able to affect changes in the\noriginal unit through notification messages. These messages will be considered belonging\nto the session scope unit and not the original unit. It is hence not recommended to use\nPAMName= in combination with NotifyAccess=all.\n",
            "subsections": []
        },
        "CAPABILITIES": {
            "content": "These options are only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled (requires\nunprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nCapabilityBoundingSet=\nControls which capabilities to include in the capability bounding set for the executed\nprocess. See capabilities(7) for details. Takes a whitespace-separated list of capability\nnames, e.g.  CAPSYSADMIN, CAPDACOVERRIDE, CAPSYSPTRACE. Capabilities listed will be\nincluded in the bounding set, all others are removed. If the list of capabilities is\nprefixed with \"~\", all but the listed capabilities will be included, the effect of the\nassignment inverted. Note that this option also affects the respective capabilities in\nthe effective, permitted and inheritable capability sets. If this option is not used, the\ncapability bounding set is not modified on process execution, hence no limits on the\ncapabilities of the process are enforced. This option may appear more than once, in which\ncase the bounding sets are merged by OR, or by AND if the lines are prefixed with \"~\"\n(see below). If the empty string is assigned to this option, the bounding set is reset to\nthe empty capability set, and all prior settings have no effect. If set to \"~\" (without\nany further argument), the bounding set is reset to the full set of available\ncapabilities, also undoing any previous settings. This does not affect commands prefixed\nwith \"+\".\n\nUse systemd-analyze(1)'s capability command to retrieve a list of capabilities defined on\nthe local system.\n\nExample: if a unit has the following,\n\nCapabilityBoundingSet=CAPA CAPB\nCapabilityBoundingSet=CAPB CAPC\n\nthen CAPA, CAPB, and CAPC are set. If the second line is prefixed with \"~\", e.g.,\n\nCapabilityBoundingSet=CAPA CAPB\nCapabilityBoundingSet=~CAPB CAPC\n\nthen, only CAPA is set.\n\nAmbientCapabilities=\nControls which capabilities to include in the ambient capability set for the executed\nprocess. Takes a whitespace-separated list of capability names, e.g.  CAPSYSADMIN,\nCAPDACOVERRIDE, CAPSYSPTRACE. This option may appear more than once, in which case\nthe ambient capability sets are merged (see the above examples in\nCapabilityBoundingSet=). If the list of capabilities is prefixed with \"~\", all but the\nlisted capabilities will be included, the effect of the assignment inverted. If the empty\nstring is assigned to this option, the ambient capability set is reset to the empty\ncapability set, and all prior settings have no effect. If set to \"~\" (without any further\nargument), the ambient capability set is reset to the full set of available capabilities,\nalso undoing any previous settings. Note that adding capabilities to the ambient\ncapability set adds them to the process's inherited capability set.\n\nAmbient capability sets are useful if you want to execute a process as a non-privileged\nuser but still want to give it some capabilities. Note that in this case option keep-caps\nis automatically added to SecureBits= to retain the capabilities over the user change.\nAmbientCapabilities= does not affect commands prefixed with \"+\".\n\nAdded in version 229.\n",
            "subsections": []
        },
        "SECURITY": {
            "content": "NoNewPrivileges=\nTakes a boolean argument. If true, ensures that the service process and all its children\ncan never gain new privileges through execve() (e.g. via setuid or setgid bits, or\nfilesystem capabilities). This is the simplest and most effective way to ensure that a\nprocess and its children can never elevate privileges again. Defaults to false. In case\nthe service will be run in a new mount namespace anyway and SELinux is disabled, all file\nsystems are mounted with MSNOSUID flag. Also see No New Privileges Flag[4].\n\nNote that this setting only has an effect on the unit's processes themselves (or any\nprocesses directly or indirectly forked off them). It has no effect on processes\npotentially invoked on request of them through tools such as at(1), crontab(1), systemd-\nrun(1), or arbitrary IPC services.\n\nAdded in version 187.\n\nSecureBits=\nControls the secure bits set for the executed process. Takes a space-separated\ncombination of options from the following list: keep-caps, keep-caps-locked,\nno-setuid-fixup, no-setuid-fixup-locked, noroot, and noroot-locked. This option may\nappear more than once, in which case the secure bits are ORed. If the empty string is\nassigned to this option, the bits are reset to 0. This does not affect commands prefixed\nwith \"+\". See capabilities(7) for details.\n",
            "subsections": []
        },
        "MANDATORY ACCESS CONTROL": {
            "content": "These options are only available for system services and are not supported for services\nrunning in per-user instances of the service manager.\n\nSELinuxContext=\nSet the SELinux security context of the executed process. If set, this will override the\nautomated domain transition. However, the policy still needs to authorize the transition.\nThis directive is ignored if SELinux is disabled. If prefixed by \"-\", failing to set the\nSELinux security context will be ignored, but it's still possible that the subsequent\nexecve() may fail if the policy doesn't allow the transition for the non-overridden\ncontext. This does not affect commands prefixed with \"+\". See setexeccon(3) for details.\n\nAdded in version 209.\n\nAppArmorProfile=\nTakes a profile name as argument. The process executed by the unit will switch to this\nprofile when started. Profiles must already be loaded in the kernel, or the unit will\nfail. If prefixed by \"-\", all errors will be ignored. This setting has no effect if\nAppArmor is not enabled. This setting does not affect commands prefixed with \"+\".\n\nAdded in version 210.\n\nSmackProcessLabel=\nTakes a SMACK64 security label as argument. The process executed by the unit will be\nstarted under this label and SMACK will decide whether the process is allowed to run or\nnot, based on it. The process will continue to run under the label specified here unless\nthe executable has its own SMACK64EXEC label, in which case the process will transition\nto run under that label. When not specified, the label that systemd is running under is\nused. This directive is ignored if SMACK is disabled.\n\nThe value may be prefixed by \"-\", in which case all errors will be ignored. An empty\nvalue may be specified to unset previous assignments. This does not affect commands\nprefixed with \"+\".\n\nAdded in version 218.\n",
            "subsections": []
        },
        "PROCESS PROPERTIES": {
            "content": "LimitCPU=, LimitFSIZE=, LimitDATA=, LimitSTACK=, LimitCORE=, LimitRSS=, LimitNOFILE=,\nLimitAS=, LimitNPROC=, LimitMEMLOCK=, LimitLOCKS=, LimitSIGPENDING=, LimitMSGQUEUE=,\nLimitNICE=, LimitRTPRIO=, LimitRTTIME=\nSet soft and hard limits on various resources for executed processes. See setrlimit(2)\nfor details on the process resource limit concept. Process resource limits may be\nspecified in two formats: either as single value to set a specific soft and hard limit to\nthe same value, or as colon-separated pair soft:hard to set both limits individually\n(e.g.  \"LimitAS=4G:16G\"). Use the string infinity to configure no limit on a specific\nresource. The multiplicative suffixes K, M, G, T, P and E (to the base 1024) may be used\nfor resource limits measured in bytes (e.g.  \"LimitAS=16G\"). For the limits referring to\ntime values, the usual time units ms, s, min, h and so on may be used (see\nsystemd.time(7) for details). Note that if no time unit is specified for LimitCPU= the\ndefault unit of seconds is implied, while for LimitRTTIME= the default unit of\nmicroseconds is implied. Also, note that the effective granularity of the limits might\ninfluence their enforcement. For example, time limits specified for LimitCPU= will be\nrounded up implicitly to multiples of 1s. For LimitNICE= the value may be specified in\ntwo syntaxes: if prefixed with \"+\" or \"-\", the value is understood as regular Linux nice\nvalue in the range -20...19. If not prefixed like this the value is understood as raw\nresource limit parameter in the range 0...40 (with 0 being equivalent to 1).\n\nNote that most process resource limits configured with these options are per-process, and\nprocesses may fork in order to acquire a new set of resources that are accounted\nindependently of the original process, and may thus escape limits set. Also note that\nLimitRSS= is not implemented on Linux, and setting it has no effect. Often it is\nadvisable to prefer the resource controls listed in systemd.resource-control(5) over\nthese per-process limits, as they apply to services as a whole, may be altered\ndynamically at runtime, and are generally more expressive. For example, MemoryMax= is a\nmore powerful (and working) replacement for LimitRSS=.\n\nNote that LimitNPROC= will limit the number of processes from one (real) UID and not the\nnumber of processes started (forked) by the service. Therefore the limit is cumulative\nfor all processes running under the same UID. Please also note that the LimitNPROC= will\nnot be enforced if the service is running as root (and not dropping privileges). Due to\nthese limitations, TasksMax= (see systemd.resource-control(5)) is typically a better\nchoice than LimitNPROC=.\n\nResource limits not configured explicitly for a unit default to the value configured in\nthe various DefaultLimitCPU=, DefaultLimitFSIZE=, ... options available in systemd-\nsystem.conf(5), and – if not configured there – the kernel or per-user defaults, as\ndefined by the OS (the latter only for user services, see below).\n\nFor system units these resource limits may be chosen freely. When these settings are\nconfigured in a user service (i.e. a service run by the per-user instance of the service\nmanager) they cannot be used to raise the limits above those set for the user manager\nitself when it was first invoked, as the user's service manager generally lacks the\nprivileges to do so. In user context these configuration options are hence only useful to\nlower the limits passed in or to raise the soft limit to the maximum of the hard limit as\nconfigured for the user. To raise the user's limits further, the available configuration\nmechanisms differ between operating systems, but typically require privileges. In most\ncases it is possible to configure higher per-user resource limits via PAM or by setting\nlimits on the system service encapsulating the user's service manager, i.e. the user's\ninstance of user@.service. After making such changes, make sure to restart the user's\nservice manager.\n\nTable 1. Resource limit directives, their equivalent ulimit shell commands and the unit\nused\n┌──────────────────┬───────────────────┬─────────────────────┬──────────────────────┐\n│ Directive        │ ulimit equivalent │ Unit                │ Notes                │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitCPU=        │ ulimit -t         │ Seconds             │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitFSIZE=      │ ulimit -f         │ Bytes               │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitDATA=       │ ulimit -d         │ Bytes               │ Don't use. This      │\n│                  │                   │                     │ limits the allowed   │\n│                  │                   │                     │ address range, not   │\n│                  │                   │                     │ memory use! Defaults │\n│                  │                   │                     │ to unlimited and     │\n│                  │                   │                     │ should not be        │\n│                  │                   │                     │ lowered. To limit    │\n│                  │                   │                     │ memory use, see      │\n│                  │                   │                     │ MemoryMax= in        │\n│                  │                   │                     │ systemd.resource-    │\n│                  │                   │                     │ control(5).          │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitSTACK=      │ ulimit -s         │ Bytes               │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitCORE=       │ ulimit -c         │ Bytes               │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitRSS=        │ ulimit -m         │ Bytes               │ Don't use. No effect │\n│                  │                   │                     │ on Linux.            │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitNOFILE=     │ ulimit -n         │ Number of File      │ Don't use. Be        │\n│                  │                   │ Descriptors         │ careful when raising │\n│                  │                   │                     │ the soft limit above │\n│                  │                   │                     │ 1024, since          │\n│                  │                   │                     │ select(2) cannot     │\n│                  │                   │                     │ function with file   │\n│                  │                   │                     │ descriptors above    │\n│                  │                   │                     │ 1023 on Linux.       │\n│                  │                   │                     │ Nowadays, the hard   │\n│                  │                   │                     │ limit defaults to    │\n│                  │                   │                     │ 524288, a very high  │\n│                  │                   │                     │ value compared to    │\n│                  │                   │                     │ historical defaults. │\n│                  │                   │                     │ Typically            │\n│                  │                   │                     │ applications should  │\n│                  │                   │                     │ increase their soft  │\n│                  │                   │                     │ limit to the hard    │\n│                  │                   │                     │ limit on their own,  │\n│                  │                   │                     │ if they are OK with  │\n│                  │                   │                     │ working with file    │\n│                  │                   │                     │ descriptors above    │\n│                  │                   │                     │ 1023, i.e. do not    │\n│                  │                   │                     │ use select(2). Note  │\n│                  │                   │                     │ that file            │\n│                  │                   │                     │ descriptors are      │\n│                  │                   │                     │ nowadays accounted   │\n│                  │                   │                     │ like any other form  │\n│                  │                   │                     │ of memory, thus      │\n│                  │                   │                     │ there should not be  │\n│                  │                   │                     │ any need to lower    │\n│                  │                   │                     │ the hard limit. Use  │\n│                  │                   │                     │ MemoryMax= to        │\n│                  │                   │                     │ control overall      │\n│                  │                   │                     │ service memory use,  │\n│                  │                   │                     │ including file       │\n│                  │                   │                     │ descriptor memory.   │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitAS=         │ ulimit -v         │ Bytes               │ Don't use. This      │\n│                  │                   │                     │ limits the allowed   │\n│                  │                   │                     │ address range, not   │\n│                  │                   │                     │ memory use! Defaults │\n│                  │                   │                     │ to unlimited and     │\n│                  │                   │                     │ should not be        │\n│                  │                   │                     │ lowered. To limit    │\n│                  │                   │                     │ memory use, see      │\n│                  │                   │                     │ MemoryMax= in        │\n│                  │                   │                     │ systemd.resource-    │\n│                  │                   │                     │ control(5).          │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitNPROC=      │ ulimit -u         │ Number of Processes │ This limit is        │\n│                  │                   │                     │ enforced based on    │\n│                  │                   │                     │ the number of        │\n│                  │                   │                     │ processes belonging  │\n│                  │                   │                     │ to the user.         │\n│                  │                   │                     │ Typically it's       │\n│                  │                   │                     │ better to track      │\n│                  │                   │                     │ processes per        │\n│                  │                   │                     │ service, i.e. use    │\n│                  │                   │                     │ TasksMax=, see       │\n│                  │                   │                     │ systemd.resource-    │\n│                  │                   │                     │ control(5).          │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitMEMLOCK=    │ ulimit -l         │ Bytes               │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitLOCKS=      │ ulimit -x         │ Number of Locks     │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitSIGPENDING= │ ulimit -i         │ Number of Queued    │ -                    │\n│                  │                   │ Signals             │                      │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitMSGQUEUE=   │ ulimit -q         │ Bytes               │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitNICE=       │ ulimit -e         │ Nice Level          │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitRTPRIO=     │ ulimit -r         │ Realtime Priority   │ -                    │\n├──────────────────┼───────────────────┼─────────────────────┼──────────────────────┤\n│ LimitRTTIME=     │ ulimit -R         │ Microseconds        │ -                    │\n└──────────────────┴───────────────────┴─────────────────────┴──────────────────────┘\n\n\nUMask=\nControls the file mode creation mask. Takes an access mode in octal notation. See\numask(2) for details. Defaults to 0022 for system units. For user units the default value\nis inherited from the per-user service manager (whose default is in turn inherited from\nthe system service manager, and thus typically also is 0022 — unless overridden by a PAM\nmodule). In order to change the per-user mask for all user services, consider setting the\nUMask= setting of the user's user@.service system service instance. The per-user umask\nmay also be set via the umask field of a user's JSON User Record[5] (for users managed by\nsystemd-homed.service(8) this field may be controlled via homectl --umask=). It may also\nbe set via a PAM module, such as pamumask(8).\n\nCoredumpFilter=\nControls which types of memory mappings will be saved if the process dumps core (using\nthe /proc/pid/coredumpfilter file). Takes a whitespace-separated combination of mapping\ntype names or numbers (with the default base 16). Mapping type names are\nprivate-anonymous, shared-anonymous, private-file-backed, shared-file-backed,\nelf-headers, private-huge, shared-huge, private-dax, shared-dax, and the special values\nall (all types) and default (the kernel default of \"private-anonymous shared-anonymous\nelf-headers private-huge\"). See core(5) for the meaning of the mapping types. When\nspecified multiple times, all specified masks are ORed. When not set, or if the empty\nvalue is assigned, the inherited value is not changed.\n\nExample 2. Add DAX pages to the dump filter\n\nCoredumpFilter=default private-dax shared-dax\n\nAdded in version 246.\n\nKeyringMode=\nControls how the kernel session keyring is set up for the service (see session-keyring(7)\nfor details on the session keyring). Takes one of inherit, private, shared. If set to\ninherit no special keyring setup is done, and the kernel's default behaviour is applied.\nIf private is used a new session keyring is allocated when a service process is invoked,\nand it is not linked up with any user keyring. This is the recommended setting for system\nservices, as this ensures that multiple services running under the same system user ID\n(in particular the root user) do not share their key material among each other. If shared\nis used a new session keyring is allocated as for private, but the user keyring of the\nuser configured with User= is linked into it, so that keys assigned to the user may be\nrequested by the unit's processes. In this mode multiple units running processes under\nthe same user ID may share key material. Unless inherit is selected the unique invocation\nID for the unit (see below) is added as a protected key by the name \"invocationid\" to\nthe newly created session keyring. Defaults to private for services of the system service\nmanager and to inherit for non-service units and for services of the user service\nmanager.\n\nAdded in version 235.\n\nOOMScoreAdjust=\nSets the adjustment value for the Linux kernel's Out-Of-Memory (OOM) killer score for\nexecuted processes. Takes an integer between -1000 (to disable OOM killing of processes\nof this unit) and 1000 (to make killing of processes of this unit under memory pressure\nvery likely). See The /proc Filesystem[6] for details. If not specified defaults to the\nOOM score adjustment level of the service manager itself, which is normally at 0.\n\nUse the OOMPolicy= setting of service units to configure how the service manager shall\nreact to the kernel OOM killer or systemd-oomd terminating a process of the service. See\nsystemd.service(5) for details.\n\nTimerSlackNSec=\nSets the timer slack in nanoseconds for the executed processes. The timer slack controls\nthe accuracy of wake-ups triggered by timers. See prctl(2) for more information. Note\nthat in contrast to most other time span definitions this parameter takes an integer\nvalue in nano-seconds if no unit is specified. The usual time units are understood too.\n\nPersonality=\nControls which kernel architecture uname(2) shall report, when invoked by unit processes.\nTakes one of the architecture identifiers arm64, arm64-be, arm, arm-be, x86, x86-64, ppc,\nppc-le, ppc64, ppc64-le, s390 or s390x. Which personality architectures are supported\ndepends on the kernel's native architecture. Usually the 64-bit versions of the various\nsystem architectures support their immediate 32-bit personality architecture counterpart,\nbut no others. For example, x86-64 systems support the x86-64 and x86 personalities but\nno others. The personality feature is useful when running 32-bit services on a 64-bit\nhost system. If not specified, the personality is left unmodified and thus reflects the\npersonality of the host system's kernel. This option is not useful on architectures for\nwhich only one native word width was ever available, such as m68k (32-bit only) or alpha\n(64-bit only).\n\nAdded in version 209.\n\nIgnoreSIGPIPE=\nTakes a boolean argument. If true, SIGPIPE is ignored in the executed process. Defaults\nto true since SIGPIPE is generally only useful in shell pipelines.\n",
            "subsections": []
        },
        "SCHEDULING": {
            "content": "Nice=\nSets the default nice level (scheduling priority) for executed processes. Takes an\ninteger between -20 (highest priority) and 19 (lowest priority). In case of resource\ncontention, smaller values mean more resources will be made available to the unit's\nprocesses, larger values mean less resources will be made available. See setpriority(2)\nfor details.\n\nCPUSchedulingPolicy=\nSets the CPU scheduling policy for executed processes. Takes one of other, batch, idle,\nfifo or rr. See schedsetscheduler(2) for details.\n\nCPUSchedulingPriority=\nSets the CPU scheduling priority for executed processes. The available priority range\ndepends on the selected CPU scheduling policy (see above). For real-time scheduling\npolicies an integer between 1 (lowest priority) and 99 (highest priority) can be used. In\ncase of CPU resource contention, smaller values mean less CPU time is made available to\nthe service, larger values mean more. See schedsetscheduler(2) for details.\n\nCPUSchedulingResetOnFork=\nTakes a boolean argument. If true, elevated CPU scheduling priorities and policies will\nbe reset when the executed processes call fork(2), and can hence not leak into child\nprocesses. See schedsetscheduler(2) for details. Defaults to false.\n\nCPUAffinity=\nControls the CPU affinity of the executed processes. Takes a list of CPU indices or\nranges separated by either whitespace or commas. Alternatively, takes a special \"numa\"\nvalue in which case systemd automatically derives allowed CPU range based on the value of\nNUMAMask= option. CPU ranges are specified by the lower and upper CPU indices separated\nby a dash. This option may be specified more than once, in which case the specified CPU\naffinity masks are merged. If the empty string is assigned, the mask is reset, all\nassignments prior to this will have no effect. See schedsetaffinity(2) for details.\n\nNUMAPolicy=\nControls the NUMA memory policy of the executed processes. Takes a policy type, one of:\ndefault, preferred, bind, interleave and local. A list of NUMA nodes that should be\nassociated with the policy must be specified in NUMAMask=. For more details on each\npolicy please see, setmempolicy(2). For overall overview of NUMA support in Linux see,\nnuma(7).\n\nAdded in version 243.\n\nNUMAMask=\nControls the NUMA node list which will be applied alongside with selected NUMA policy.\nTakes a list of NUMA nodes and has the same syntax as a list of CPUs for CPUAffinity=\noption or special \"all\" value which will include all available NUMA nodes in the mask.\nNote that the list of NUMA nodes is not required for default and local policies and for\npreferred policy we expect a single NUMA node.\n\nAdded in version 243.\n\nIOSchedulingClass=\nSets the I/O scheduling class for executed processes. Takes one of the strings realtime,\nbest-effort or idle. The kernel's default scheduling class is best-effort at a priority\nof 4. If the empty string is assigned to this option, all prior assignments to both\nIOSchedulingClass= and IOSchedulingPriority= have no effect. See ioprioset(2) for\ndetails.\n\nIOSchedulingPriority=\nSets the I/O scheduling priority for executed processes. Takes an integer between 0\n(highest priority) and 7 (lowest priority). In case of I/O contention, smaller values\nmean more I/O bandwidth is made available to the unit's processes, larger values mean\nless bandwidth. The available priorities depend on the selected I/O scheduling class (see\nabove). If the empty string is assigned to this option, all prior assignments to both\nIOSchedulingClass= and IOSchedulingPriority= have no effect. For the kernel's default\nscheduling class (best-effort) this defaults to 4. See ioprioset(2) for details.\n",
            "subsections": []
        },
        "SANDBOXING": {
            "content": "The following sandboxing options are an effective way to limit the exposure of the system\ntowards the unit's processes. It is recommended to turn on as many of these options for each\nunit as is possible without negatively affecting the process' ability to operate. Note that\nmany of these sandboxing features are gracefully turned off on systems where the underlying\nsecurity mechanism is not available. For example, ProtectSystem= has no effect if the kernel\nis built without file system namespacing or if the service manager runs in a container\nmanager that makes file system namespacing unavailable to its payload. Similarly,\nRestrictRealtime= has no effect on systems that lack support for SECCOMP system call\nfiltering, or in containers where support for this is turned off.\n\nAlso note that some sandboxing functionality is generally not available in user services\n(i.e. services run by the per-user service manager). Specifically, the various settings\nrequiring file system namespacing support (such as ProtectSystem=) are not available, as the\nunderlying kernel functionality is only accessible to privileged processes. However, most\nnamespacing settings, that will not work on their own in user services, will work when used\nin conjunction with PrivateUsers=true.\n\nProtectSystem=\nTakes a boolean argument or the special values \"full\" or \"strict\". If true, mounts the\n/usr/ and the boot loader directories (/boot and /efi) read-only for processes invoked by\nthis unit. If set to \"full\", the /etc/ directory is mounted read-only, too. If set to\n\"strict\" the entire file system hierarchy is mounted read-only, except for the API file\nsystem subtrees /dev/, /proc/ and /sys/ (protect these directories using PrivateDevices=,\nProtectKernelTunables=, ProtectControlGroups=). This setting ensures that any\nmodification of the vendor-supplied operating system (and optionally its configuration,\nand local mounts) is prohibited for the service. It is recommended to enable this setting\nfor all long-running services, unless they are involved with system updates or need to\nmodify the operating system in other ways. If this option is used, ReadWritePaths= may be\nused to exclude specific directories from being made read-only. This setting is implied\nif DynamicUser= is set. This setting cannot ensure protection in all cases. In general it\nhas the same limitations as ReadOnlyPaths=, see below. Defaults to off.\n\nAdded in version 214.\n\nProtectHome=\nTakes a boolean argument or the special values \"read-only\" or \"tmpfs\". If true, the\ndirectories /home/, /root, and /run/user are made inaccessible and empty for processes\ninvoked by this unit. If set to \"read-only\", the three directories are made read-only\ninstead. If set to \"tmpfs\", temporary file systems are mounted on the three directories\nin read-only mode. The value \"tmpfs\" is useful to hide home directories not relevant to\nthe processes invoked by the unit, while still allowing necessary directories to be made\nvisible when listed in BindPaths= or BindReadOnlyPaths=.\n\nSetting this to \"yes\" is mostly equivalent to setting the three directories in\nInaccessiblePaths=. Similarly, \"read-only\" is mostly equivalent to ReadOnlyPaths=, and\n\"tmpfs\" is mostly equivalent to TemporaryFileSystem= with \":ro\".\n\nIt is recommended to enable this setting for all long-running services (in particular\nnetwork-facing ones), to ensure they cannot get access to private user data, unless the\nservices actually require access to the user's private data. This setting is implied if\nDynamicUser= is set. This setting cannot ensure protection in all cases. In general it\nhas the same limitations as ReadOnlyPaths=, see below.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 214.\n\nRuntimeDirectory=, StateDirectory=, CacheDirectory=, LogsDirectory=, ConfigurationDirectory=\nThese options take a whitespace-separated list of directory names. The specified\ndirectory names must be relative, and may not include \"..\". If set, when the unit is\nstarted, one or more directories by the specified names will be created (including their\nparents) below the locations defined in the following table. Also, the corresponding\nenvironment variable will be defined with the full paths of the directories. If multiple\ndirectories are set, then in the environment variable the paths are concatenated with\ncolon (\":\").\n\nTable 2. Automatic directory creation and environment variables\n┌─────────────────────────┬────────────────┬──────────────────────┬──────────────────────────┐\n│ Directory               │ Below path for │ Below path for user  │ Environment variable     │\n│                         │ system units   │ units                │ set                      │\n├─────────────────────────┼────────────────┼──────────────────────┼──────────────────────────┤\n│ RuntimeDirectory=       │ /run/          │ $XDGRUNTIMEDIR     │ $RUNTIMEDIRECTORY       │\n├─────────────────────────┼────────────────┼──────────────────────┼──────────────────────────┤\n│ StateDirectory=         │ /var/lib/      │ $XDGSTATEHOME      │ $STATEDIRECTORY         │\n├─────────────────────────┼────────────────┼──────────────────────┼──────────────────────────┤\n│ CacheDirectory=         │ /var/cache/    │ $XDGCACHEHOME      │ $CACHEDIRECTORY         │\n├─────────────────────────┼────────────────┼──────────────────────┼──────────────────────────┤\n│ LogsDirectory=          │ /var/log/      │ $XDGSTATEHOME/log/ │ $LOGSDIRECTORY          │\n├─────────────────────────┼────────────────┼──────────────────────┼──────────────────────────┤\n│ ConfigurationDirectory= │ /etc/          │ $XDGCONFIGHOME     │ $CONFIGURATIONDIRECTORY │\n└─────────────────────────┴────────────────┴──────────────────────┴──────────────────────────┘\n\nIn case of RuntimeDirectory= the innermost subdirectories are removed when the unit is\nstopped. It is possible to preserve the specified directories in this case if\nRuntimeDirectoryPreserve= is configured to restart or yes (see below). The directories\nspecified with StateDirectory=, CacheDirectory=, LogsDirectory=, ConfigurationDirectory=\nare not removed when the unit is stopped.\n\nExcept in case of ConfigurationDirectory=, the innermost specified directories will be\nowned by the user and group specified in User= and Group=. If the specified directories\nalready exist and their owning user or group do not match the configured ones, all files\nand directories below the specified directories as well as the directories themselves\nwill have their file ownership recursively changed to match what is configured. As an\noptimization, if the specified directories are already owned by the right user and group,\nfiles and directories below of them are left as-is, even if they do not match what is\nrequested. The innermost specified directories will have their access mode adjusted to\nthe what is specified in RuntimeDirectoryMode=, StateDirectoryMode=, CacheDirectoryMode=,\nLogsDirectoryMode= and ConfigurationDirectoryMode=.\n\nThese options imply BindPaths= for the specified paths. When combined with RootDirectory=\nor RootImage= these paths always reside on the host and are mounted from there into the\nunit's file system namespace.\n\nIf DynamicUser= is used, the logic for CacheDirectory=, LogsDirectory= and\nStateDirectory= is slightly altered: the directories are created below\n/var/cache/private, /var/log/private and /var/lib/private, respectively, which are host\ndirectories made inaccessible to unprivileged users, which ensures that access to these\ndirectories cannot be gained through dynamic user ID recycling. Symbolic links are\ncreated to hide this difference in behaviour. Both from perspective of the host and from\ninside the unit, the relevant directories hence always appear directly below /var/cache,\n/var/log and /var/lib.\n\nUse RuntimeDirectory= to manage one or more runtime directories for the unit and bind\ntheir lifetime to the daemon runtime. This is particularly useful for unprivileged\ndaemons that cannot create runtime directories in /run/ due to lack of privileges, and to\nmake sure the runtime directory is cleaned up automatically after use. For runtime\ndirectories that require more complex or different configuration or lifetime guarantees,\nplease consider using tmpfiles.d(5).\n\nRuntimeDirectory=, StateDirectory=, CacheDirectory= and LogsDirectory= optionally support\na second parameter, separated by \":\". The second parameter will be interpreted as a\ndestination path that will be created as a symlink to the directory. The symlinks will be\ncreated after any BindPaths= or TemporaryFileSystem= options have been set up, to make\nephemeral symlinking possible. The same source can have multiple symlinks, by using the\nsame first parameter, but a different second parameter.\n\nThe directories defined by these options are always created under the standard paths used\nby systemd (/var/, /run/, /etc/, ...). If the service needs directories in a different\nlocation, a different mechanism has to be used to create them.\n\ntmpfiles.d(5) provides functionality that overlaps with these options. Using these\noptions is recommended, because the lifetime of the directories is tied directly to the\nlifetime of the unit, and it is not necessary to ensure that the tmpfiles.d configuration\nis executed before the unit is started.\n\nTo remove any of the directories created by these settings, use the systemctl clean ...\ncommand on the relevant units, see systemctl(1) for details.\n\nExample: if a system service unit has the following,\n\nRuntimeDirectory=foo/bar baz\n\nthe service manager creates /run/foo (if it does not exist), /run/foo/bar, and /run/baz.\nThe directories /run/foo/bar and /run/baz except /run/foo are owned by the user and group\nspecified in User= and Group=, and removed when the service is stopped.\n\nExample: if a system service unit has the following,\n\nRuntimeDirectory=foo/bar\nStateDirectory=aaa/bbb ccc\n\nthen the environment variable \"RUNTIMEDIRECTORY\" is set with \"/run/foo/bar\", and\n\"STATEDIRECTORY\" is set with \"/var/lib/aaa/bbb:/var/lib/ccc\".\n\nExample: if a system service unit has the following,\n\nRuntimeDirectory=foo:bar foo:baz\n\nthe service manager creates /run/foo (if it does not exist), and /run/bar plus /run/baz\nas symlinks to /run/foo.\n\nAdded in version 211.\n\nRuntimeDirectoryMode=, StateDirectoryMode=, CacheDirectoryMode=, LogsDirectoryMode=,\nConfigurationDirectoryMode=\nSpecifies the access mode of the directories specified in RuntimeDirectory=,\nStateDirectory=, CacheDirectory=, LogsDirectory=, or ConfigurationDirectory=,\nrespectively, as an octal number. Defaults to 0755. See \"Permissions\" in\npathresolution(7) for a discussion of the meaning of permission bits.\n\nAdded in version 234.\n\nRuntimeDirectoryPreserve=\nTakes a boolean argument or restart. If set to no (the default), the directories\nspecified in RuntimeDirectory= are always removed when the service stops. If set to\nrestart the directories are preserved when the service is both automatically and manually\nrestarted. Here, the automatic restart means the operation specified in Restart=, and\nmanual restart means the one triggered by systemctl restart foo.service. If set to yes,\nthen the directories are not removed when the service is stopped. Note that since the\nruntime directory /run/ is a mount point of \"tmpfs\", then for system services the\ndirectories specified in RuntimeDirectory= are removed when the system is rebooted.\n\nAdded in version 235.\n\nTimeoutCleanSec=\nConfigures a timeout on the clean-up operation requested through systemctl clean ..., see\nsystemctl(1) for details. Takes the usual time values and defaults to infinity, i.e. by\ndefault no timeout is applied. If a timeout is configured the clean operation will be\naborted forcibly when the timeout is reached, potentially leaving resources on disk.\n\nAdded in version 244.\n\nReadWritePaths=, ReadOnlyPaths=, InaccessiblePaths=, ExecPaths=, NoExecPaths=\nSets up a new file system namespace for executed processes. These options may be used to\nlimit access a process has to the file system. Each setting takes a space-separated list\nof paths relative to the host's root directory (i.e. the system running the service\nmanager). Note that if paths contain symlinks, they are resolved relative to the root\ndirectory set with RootDirectory=/RootImage=.\n\nPaths listed in ReadWritePaths= are accessible from within the namespace with the same\naccess modes as from outside of it. Paths listed in ReadOnlyPaths= are accessible for\nreading only, writing will be refused even if the usual file access controls would permit\nthis. Nest ReadWritePaths= inside of ReadOnlyPaths= in order to provide writable\nsubdirectories within read-only directories. Use ReadWritePaths= in order to allow-list\nspecific paths for write access if ProtectSystem=strict is used. Note that\nReadWritePaths= cannot be used to gain write access to a file system whose superblock is\nmounted read-only. On Linux, for each mount point write access is granted only if the\nmount point itself and the file system superblock backing it are not marked read-only.\nReadWritePaths= only controls the former, not the latter, hence a read-only file system\nsuperblock remains protected.\n\nPaths listed in InaccessiblePaths= will be made inaccessible for processes inside the\nnamespace along with everything below them in the file system hierarchy. This may be more\nrestrictive than desired, because it is not possible to nest ReadWritePaths=,\nReadOnlyPaths=, BindPaths=, or BindReadOnlyPaths= inside it. For a more flexible option,\nsee TemporaryFileSystem=.\n\nContent in paths listed in NoExecPaths= are not executable even if the usual file access\ncontrols would permit this. Nest ExecPaths= inside of NoExecPaths= in order to provide\nexecutable content within non-executable directories.\n\nNon-directory paths may be specified as well. These options may be specified more than\nonce, in which case all paths listed will have limited access from within the namespace.\nIf the empty string is assigned to this option, the specific list is reset, and all prior\nassignments have no effect.\n\nPaths in ReadWritePaths=, ReadOnlyPaths=, InaccessiblePaths=, ExecPaths= and NoExecPaths=\nmay be prefixed with \"-\", in which case they will be ignored when they do not exist. If\nprefixed with \"+\" the paths are taken relative to the root directory of the unit, as\nconfigured with RootDirectory=/RootImage=, instead of relative to the root directory of\nthe host (see above). When combining \"-\" and \"+\" on the same path make sure to specify\n\"-\" first, and \"+\" second.\n\nNote that these settings will disconnect propagation of mounts from the unit's processes\nto the host. This means that this setting may not be used for services which shall be\nable to install mount points in the main mount namespace. For ReadWritePaths= and\nReadOnlyPaths=, propagation in the other direction is not affected, i.e. mounts created\non the host generally appear in the unit processes' namespace, and mounts removed on the\nhost also disappear there too. In particular, note that mount propagation from host to\nunit will result in unmodified mounts to be created in the unit's namespace, i.e.\nwritable mounts appearing on the host will be writable in the unit's namespace too, even\nwhen propagated below a path marked with ReadOnlyPaths=! Restricting access with these\noptions hence does not extend to submounts of a directory that are created later on. This\nmeans the lock-down offered by that setting is not complete, and does not offer full\nprotection.\n\nNote that the effect of these settings may be undone by privileged processes. In order to\nset up an effective sandboxed environment for a unit it is thus recommended to combine\nthese settings with either CapabilityBoundingSet=~CAPSYSADMIN or\nSystemCallFilter=~@mount.\n\nPlease be extra careful when applying these options to API file systems (a list of them\ncould be found in MountAPIVPS=), since they may be required for basic system\nfunctionalities. Moreover, /run/ needs to be writable for setting up mount namespace and\npropagation.\n\nSimple allow-list example using these directives:\n\n[Service]\nReadOnlyPaths=/\nReadWritePaths=/var /run\nInaccessiblePaths=-/lost+found\nNoExecPaths=/\nExecPaths=/usr/sbin/mydaemon /usr/lib /usr/lib64\n\nThese options are only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 231.\n\nTemporaryFileSystem=\nTakes a space-separated list of mount points for temporary file systems (tmpfs). If set,\na new file system namespace is set up for executed processes, and a temporary file system\nis mounted on each mount point. This option may be specified more than once, in which\ncase temporary file systems are mounted on all listed mount points. If the empty string\nis assigned to this option, the list is reset, and all prior assignments have no effect.\nEach mount point may optionally be suffixed with a colon (\":\") and mount options such as\n\"size=10%\" or \"ro\". By default, each temporary file system is mounted with\n\"nodev,strictatime,mode=0755\". These can be disabled by explicitly specifying the\ncorresponding mount options, e.g., \"dev\" or \"nostrictatime\".\n\nThis is useful to hide files or directories not relevant to the processes invoked by the\nunit, while necessary files or directories can be still accessed by combining with\nBindPaths= or BindReadOnlyPaths=:\n\nExample: if a unit has the following,\n\nTemporaryFileSystem=/var:ro\nBindReadOnlyPaths=/var/lib/systemd\n\nthen the invoked processes by the unit cannot see any files or directories under /var/\nexcept for /var/lib/systemd or its contents.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 238.\n\nPrivateTmp=\nTakes a boolean argument. If true, sets up a new file system namespace for the executed\nprocesses and mounts private /tmp/ and /var/tmp/ directories inside it that are not\nshared by processes outside of the namespace. This is useful to secure access to\ntemporary files of the process, but makes sharing between processes via /tmp/ or\n/var/tmp/ impossible. If true, all temporary files created by a service in these\ndirectories will be removed after the service is stopped. Defaults to false. It is\npossible to run two or more units within the same private /tmp/ and /var/tmp/ namespace\nby using the JoinsNamespaceOf= directive, see systemd.unit(5) for details. This setting\nis implied if DynamicUser= is set. For this setting, the same restrictions regarding\nmount propagation and privileges apply as for ReadOnlyPaths= and related calls, see\nabove. Enabling this setting has the side effect of adding Requires= and After=\ndependencies on all mount units necessary to access /tmp/ and /var/tmp/. Moreover an\nimplicitly After= ordering on systemd-tmpfiles-setup.service(8) is added.\n\nNote that the implementation of this setting might be impossible (for example if mount\nnamespaces are not available), and the unit should be written in a way that does not\nsolely rely on this setting for security.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nPrivateDevices=\nTakes a boolean argument. If true, sets up a new /dev/ mount for the executed processes\nand only adds API pseudo devices such as /dev/null, /dev/zero or /dev/random (as well as\nthe pseudo TTY subsystem) to it, but no physical devices such as /dev/sda, system memory\n/dev/mem, system ports /dev/port and others. This is useful to turn off physical device\naccess by the executed process. Defaults to false.\n\nEnabling this option will install a system call filter to block low-level I/O system\ncalls that are grouped in the @raw-io set, remove CAPMKNOD and CAPSYSRAWIO from the\ncapability bounding set for the unit, and set DevicePolicy=closed (see systemd.resource-\ncontrol(5) for details). Note that using this setting will disconnect propagation of\nmounts from the service to the host (propagation in the opposite direction continues to\nwork). This means that this setting may not be used for services which shall be able to\ninstall mount points in the main mount namespace. The new /dev/ will be mounted read-only\nand 'noexec'. The latter may break old programs which try to set up executable memory by\nusing mmap(2) of /dev/zero instead of using MAPANON. For this setting the same\nrestrictions regarding mount propagation and privileges apply as for ReadOnlyPaths= and\nrelated calls, see above.\n\nNote that the implementation of this setting might be impossible (for example if mount\nnamespaces are not available), and the unit should be written in a way that does not\nsolely rely on this setting for security.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nWhen access to some but not all devices must be possible, the DeviceAllow= setting might\nbe used instead. See systemd.resource-control(5).\n\nAdded in version 209.\n\nPrivateNetwork=\nTakes a boolean argument. If true, sets up a new network namespace for the executed\nprocesses and configures only the loopback network device \"lo\" inside it. No other\nnetwork devices will be available to the executed process. This is useful to turn off\nnetwork access by the executed process. Defaults to false. It is possible to run two or\nmore units within the same private network namespace by using the JoinsNamespaceOf=\ndirective, see systemd.unit(5) for details. Note that this option will disconnect all\nsocket families from the host, including AFNETLINK and AFUNIX. Effectively, for\nAFNETLINK this means that device configuration events received from systemd-\nudevd.service(8) are not delivered to the unit's processes. And for AFUNIX this has the\neffect that AFUNIX sockets in the abstract socket namespace of the host will become\nunavailable to the unit's processes (however, those located in the file system will\ncontinue to be accessible).\n\nNote that the implementation of this setting might be impossible (for example if network\nnamespaces are not available), and the unit should be written in a way that does not\nsolely rely on this setting for security.\n\nWhen this option is enabled, PrivateMounts= is implied unless it is explicitly disabled,\nand /sys will be remounted to associate it with the new network namespace.\n\nWhen this option is used on a socket unit any sockets bound on behalf of this unit will\nbe bound within a private network namespace. This may be combined with JoinsNamespaceOf=\nto listen on sockets inside of network namespaces of other services.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nNetworkNamespacePath=\nTakes an absolute file system path referring to a Linux network namespace pseudo-file\n(i.e. a file like /proc/$PID/ns/net or a bind mount or symlink to one). When set the\ninvoked processes are added to the network namespace referenced by that path. The path\nhas to point to a valid namespace file at the moment the processes are forked off. If\nthis option is used PrivateNetwork= has no effect. If this option is used together with\nJoinsNamespaceOf= then it only has an effect if this unit is started before any of the\nlisted units that have PrivateNetwork= or NetworkNamespacePath= configured, as otherwise\nthe network namespace of those units is reused.\n\nWhen this option is enabled, PrivateMounts= is implied unless it is explicitly disabled,\nand /sys will be remounted to associate it with the new network namespace.\n\nWhen this option is used on a socket unit any sockets bound on behalf of this unit will\nbe bound within the specified network namespace.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 242.\n\nPrivateIPC=\nTakes a boolean argument. If true, sets up a new IPC namespace for the executed\nprocesses. Each IPC namespace has its own set of System V IPC identifiers and its own\nPOSIX message queue file system. This is useful to avoid name clash of IPC identifiers.\nDefaults to false. It is possible to run two or more units within the same private IPC\nnamespace by using the JoinsNamespaceOf= directive, see systemd.unit(5) for details.\n\nNote that IPC namespacing does not have an effect on AFUNIX sockets, which are the most\ncommon form of IPC used on Linux. Instead, AFUNIX sockets in the file system are subject\nto mount namespacing, and those in the abstract namespace are subject to network\nnamespacing. IPC namespacing only has an effect on SysV IPC (which is mostly legacy) as\nwell as POSIX message queues (for which AFUNIX/SOCKSEQPACKET sockets are typically a\nbetter replacement). IPC namespacing also has no effect on POSIX shared memory (which is\nsubject to mount namespacing) either. See ipcnamespaces(7) for the details.\n\nNote that the implementation of this setting might be impossible (for example if IPC\nnamespaces are not available), and the unit should be written in a way that does not\nsolely rely on this setting for security.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 248.\n\nIPCNamespacePath=\nTakes an absolute file system path referring to a Linux IPC namespace pseudo-file (i.e. a\nfile like /proc/$PID/ns/ipc or a bind mount or symlink to one). When set the invoked\nprocesses are added to the network namespace referenced by that path. The path has to\npoint to a valid namespace file at the moment the processes are forked off. If this\noption is used PrivateIPC= has no effect. If this option is used together with\nJoinsNamespaceOf= then it only has an effect if this unit is started before any of the\nlisted units that have PrivateIPC= or IPCNamespacePath= configured, as otherwise the\nnetwork namespace of those units is reused.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 248.\n\nMemoryKSM=\nTakes a boolean argument. When set, it enables KSM (kernel samepage merging) for the\nprocesses. KSM is a memory-saving de-duplication feature. Anonymous memory pages with\nidentical content can be replaced by a single write-protected page. This feature should\nonly be enabled for jobs that share the same security domain. For details, see Kernel\nSamepage Merging[7] in the kernel documentation.\n\nNote that this functionality might not be available, for example if KSM is disabled in\nthe kernel, or the kernel doesn't support controlling KSM at the process level through\nprctl(2).\n\nAdded in version 254.\n\nPrivateUsers=\nTakes a boolean argument. If true, sets up a new user namespace for the executed\nprocesses and configures a minimal user and group mapping, that maps the \"root\" user and\ngroup as well as the unit's own user and group to themselves and everything else to the\n\"nobody\" user and group. This is useful to securely detach the user and group databases\nused by the unit from the rest of the system, and thus to create an effective sandbox\nenvironment. All files, directories, processes, IPC objects and other resources owned by\nusers/groups not equaling \"root\" or the unit's own will stay visible from within the unit\nbut appear owned by the \"nobody\" user and group. If this mode is enabled, all unit\nprocesses are run without privileges in the host user namespace (regardless if the unit's\nown user/group is \"root\" or not). Specifically this means that the process will have zero\nprocess capabilities on the host's user namespace, but full capabilities within the\nservice's user namespace. Settings such as CapabilityBoundingSet= will affect only the\nlatter, and there's no way to acquire additional capabilities in the host's user\nnamespace. Defaults to off.\n\nWhen this setting is set up by a per-user instance of the service manager, the mapping of\nthe \"root\" user and group to itself is omitted (unless the user manager is root).\nAdditionally, in the per-user instance manager case, the user namespace will be set up\nbefore most other namespaces. This means that combining PrivateUsers=true with other\nnamespaces will enable use of features not normally supported by the per-user instances\nof the service manager.\n\nThis setting is particularly useful in conjunction with RootDirectory=/RootImage=, as the\nneed to synchronize the user and group databases in the root directory and on the host is\nreduced, as the only users and groups who need to be matched are \"root\", \"nobody\" and the\nunit's own user and group.\n\nNote that the implementation of this setting might be impossible (for example if user\nnamespaces are not available), and the unit should be written in a way that does not\nsolely rely on this setting for security.\n\nAdded in version 232.\n\nProtectHostname=\nTakes a boolean argument. When set, sets up a new UTS namespace for the executed\nprocesses. In addition, changing hostname or domainname is prevented. Defaults to off.\n\nNote that the implementation of this setting might be impossible (for example if UTS\nnamespaces are not available), and the unit should be written in a way that does not\nsolely rely on this setting for security.\n\nNote that when this option is enabled for a service hostname changes no longer propagate\nfrom the system into the service, it is hence not suitable for services that need to take\nnotice of system hostname changes dynamically.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 242.\n\nProtectClock=\nTakes a boolean argument. If set, writes to the hardware clock or system clock will be\ndenied. Defaults to off. Enabling this option removes CAPSYSTIME and CAPWAKEALARM\nfrom the capability bounding set for this unit, installs a system call filter to block\ncalls that can set the clock, and DeviceAllow=char-rtc r is implied. Note that the system\ncalls are blocked altogether, the filter does not take into account that some of the\ncalls can be used to read the clock state with some parameter combinations. Effectively,\n/dev/rtc0, /dev/rtc1, etc. are made read-only to the service. See systemd.resource-\ncontrol(5) for the details about DeviceAllow=.\n\nIt is recommended to turn this on for most services that do not need modify the clock or\ncheck its state.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 245.\n\nProtectKernelTunables=\nTakes a boolean argument. If true, kernel variables accessible through /proc/sys/, /sys/,\n/proc/sysrq-trigger, /proc/latencystats, /proc/acpi, /proc/timerstats, /proc/fs and\n/proc/irq will be made read-only to all processes of the unit. Usually, tunable kernel\nvariables should be initialized only at boot-time, for example with the sysctl.d(5)\nmechanism. Few services need to write to these at runtime; it is hence recommended to\nturn this on for most services. For this setting the same restrictions regarding mount\npropagation and privileges apply as for ReadOnlyPaths= and related calls, see above.\nDefaults to off. Note that this option does not prevent indirect changes to kernel\ntunables effected by IPC calls to other processes. However, InaccessiblePaths= may be\nused to make relevant IPC file system objects inaccessible. If ProtectKernelTunables= is\nset, MountAPIVFS=yes is implied.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 232.\n\nProtectKernelModules=\nTakes a boolean argument. If true, explicit module loading will be denied. This allows\nmodule load and unload operations to be turned off on modular kernels. It is recommended\nto turn this on for most services that do not need special file systems or extra kernel\nmodules to work. Defaults to off. Enabling this option removes CAPSYSMODULE from the\ncapability bounding set for the unit, and installs a system call filter to block module\nsystem calls, also /usr/lib/modules is made inaccessible. For this setting the same\nrestrictions regarding mount propagation and privileges apply as for ReadOnlyPaths= and\nrelated calls, see above. Note that limited automatic module loading due to user\nconfiguration or kernel mapping tables might still happen as side effect of requested\nuser operations, both privileged and unprivileged. To disable module auto-load feature\nplease see sysctl.d(5) kernel.modulesdisabled mechanism and\n/proc/sys/kernel/modulesdisabled documentation.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 232.\n\nProtectKernelLogs=\nTakes a boolean argument. If true, access to the kernel log ring buffer will be denied.\nIt is recommended to turn this on for most services that do not need to read from or\nwrite to the kernel log ring buffer. Enabling this option removes CAPSYSLOG from the\ncapability bounding set for this unit, and installs a system call filter to block the\nsyslog(2) system call (not to be confused with the libc API syslog(3) for userspace\nlogging). The kernel exposes its log buffer to userspace via /dev/kmsg and /proc/kmsg. If\nenabled, these are made inaccessible to all the processes in the unit.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 244.\n\nProtectControlGroups=\nTakes a boolean argument. If true, the Linux Control Groups (cgroups(7)) hierarchies\naccessible through /sys/fs/cgroup/ will be made read-only to all processes of the unit.\nExcept for container managers no services should require write access to the control\ngroups hierarchies; it is hence recommended to turn this on for most services. For this\nsetting the same restrictions regarding mount propagation and privileges apply as for\nReadOnlyPaths= and related calls, see above. Defaults to off. If ProtectControlGroups= is\nset, MountAPIVFS=yes is implied.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 232.\n\nRestrictAddressFamilies=\nRestricts the set of socket address families accessible to the processes of this unit.\nTakes \"none\", or a space-separated list of address family names to allow-list, such as\nAFUNIX, AFINET or AFINET6. When \"none\" is specified, then all address families will be\ndenied. When prefixed with \"~\" the listed address families will be applied as deny list,\notherwise as allow list. Note that this restricts access to the socket(2) system call\nonly. Sockets passed into the process by other means (for example, by using socket\nactivation with socket units, see systemd.socket(5)) are unaffected. Also, sockets\ncreated with socketpair() (which creates connected AFUNIX sockets only) are unaffected.\nNote that this option has no effect on 32-bit x86, s390, s390x, mips, mips-le, ppc,\nppc-le, ppc64, ppc64-le and is ignored (but works correctly on other ABIs, including\nx86-64). Note that on systems supporting multiple ABIs (such as x86/x86-64) it is\nrecommended to turn off alternative ABIs for services, so that they cannot be used to\ncircumvent the restrictions of this option. Specifically, it is recommended to combine\nthis option with SystemCallArchitectures=native or similar. By default, no restrictions\napply, all address families are accessible to processes. If assigned the empty string,\nany previous address family restriction changes are undone. This setting does not affect\ncommands prefixed with \"+\".\n\nUse this option to limit exposure of processes to remote access, in particular via exotic\nand sensitive network protocols, such as AFPACKET. Note that in most cases, the local\nAFUNIX address family should be included in the configured allow list as it is\nfrequently used for local communication, including for syslog(2) logging.\n\nAdded in version 211.\n\nRestrictFileSystems=\nRestricts the set of filesystems processes of this unit can open files on. Takes a\nspace-separated list of filesystem names. Any filesystem listed is made accessible to the\nunit's processes, access to filesystem types not listed is prohibited (allow-listing). If\nthe first character of the list is \"~\", the effect is inverted: access to the filesystems\nlisted is prohibited (deny-listing). If the empty string is assigned, access to\nfilesystems is not restricted.\n\nIf you specify both types of this option (i.e. allow-listing and deny-listing), the first\nencountered will take precedence and will dictate the default action (allow access to the\nfilesystem or deny it). Then the next occurrences of this option will add or delete the\nlisted filesystems from the set of the restricted filesystems, depending on its type and\nthe default action.\n\nExample: if a unit has the following,\n\nRestrictFileSystems=ext4 tmpfs\nRestrictFileSystems=ext2 ext4\n\nthen access to ext4, tmpfs, and ext2 is allowed and access to other filesystems is\ndenied.\n\nExample: if a unit has the following,\n\nRestrictFileSystems=ext4 tmpfs\nRestrictFileSystems=~ext4\n\nthen only access tmpfs is allowed.\n\nExample: if a unit has the following,\n\nRestrictFileSystems=~ext4 tmpfs\nRestrictFileSystems=ext4\n\nthen only access to tmpfs is denied.\n\nAs the number of possible filesystems is large, predefined sets of filesystems are\nprovided. A set starts with \"@\" character, followed by name of the set.\n\nTable 3. Currently predefined filesystem sets\n┌───────────────────┬───────────────────────────────────┐\n│ Set               │ Description                       │\n├───────────────────┼───────────────────────────────────┤\n│ @basic-api        │ Basic filesystem API.             │\n├───────────────────┼───────────────────────────────────┤\n│ @auxiliary-api    │ Auxiliary filesystem API.         │\n├───────────────────┼───────────────────────────────────┤\n│ @common-block     │ Common block device filesystems.  │\n├───────────────────┼───────────────────────────────────┤\n│ @historical-block │ Historical block device           │\n│                   │ filesystems.                      │\n├───────────────────┼───────────────────────────────────┤\n│ @network          │ Well-known network filesystems.   │\n├───────────────────┼───────────────────────────────────┤\n│ @privileged-api   │ Privileged filesystem API.        │\n├───────────────────┼───────────────────────────────────┤\n│ @temporary        │ Temporary filesystems: tmpfs,     │\n│                   │ ramfs.                            │\n├───────────────────┼───────────────────────────────────┤\n│ @known            │ All known filesystems defined by  │\n│                   │ the kernel. This list is defined  │\n│                   │ statically in systemd based on a  │\n│                   │ kernel version that was available │\n│                   │ when this systemd version was     │\n│                   │ released. It will become          │\n│                   │ progressively more out-of-date as │\n│                   │ the kernel is updated.            │\n└───────────────────┴───────────────────────────────────┘\n\nUse systemd-analyze(1)'s filesystems command to retrieve a list of filesystems defined on\nthe local system.\n\nNote that this setting might not be supported on some systems (for example if the LSM\neBPF hook is not enabled in the underlying kernel or if not using the unified control\ngroup hierarchy). In that case this setting has no effect.\n\nThis option cannot be bypassed by prefixing \"+\" to the executable path in the service\nunit, as it applies to the whole control group.\n\nAdded in version 250.\n\nRestrictNamespaces=\nRestricts access to Linux namespace functionality for the processes of this unit. For\ndetails about Linux namespaces, see namespaces(7). Either takes a boolean argument, or a\nspace-separated list of namespace type identifiers. If false (the default), no\nrestrictions on namespace creation and switching are made. If true, access to any kind of\nnamespacing is prohibited. Otherwise, a space-separated list of namespace type\nidentifiers must be specified, consisting of any combination of: cgroup, ipc, net, mnt,\npid, user and uts. Any namespace type listed is made accessible to the unit's processes,\naccess to namespace types not listed is prohibited (allow-listing). By prepending the\nlist with a single tilde character (\"~\") the effect may be inverted: only the listed\nnamespace types will be made inaccessible, all unlisted ones are permitted\n(deny-listing). If the empty string is assigned, the default namespace restrictions are\napplied, which is equivalent to false. This option may appear more than once, in which\ncase the namespace types are merged by OR, or by AND if the lines are prefixed with \"~\"\n(see examples below). Internally, this setting limits access to the unshare(2), clone(2)\nand setns(2) system calls, taking the specified flags parameters into account. Note that\n— if this option is used — in addition to restricting creation and switching of the\nspecified types of namespaces (or all of them, if true) access to the setns() system call\nwith a zero flags parameter is prohibited. This setting is only supported on x86, x86-64,\nmips, mips-le, mips64, mips64-le, mips64-n32, mips64-le-n32, ppc64, ppc64-le, s390 and\ns390x, and enforces no restrictions on other architectures.\n\nExample: if a unit has the following,\n\nRestrictNamespaces=cgroup ipc\nRestrictNamespaces=cgroup net\n\nthen cgroup, ipc, and net are set. If the second line is prefixed with \"~\", e.g.,\n\nRestrictNamespaces=cgroup ipc\nRestrictNamespaces=~cgroup net\n\nthen, only ipc is set.\n\nAdded in version 233.\n\nLockPersonality=\nTakes a boolean argument. If set, locks down the personality(2) system call so that the\nkernel execution domain may not be changed from the default or the personality selected\nwith Personality= directive. This may be useful to improve security, because odd\npersonality emulations may be poorly tested and source of vulnerabilities.\n\nAdded in version 235.\n\nMemoryDenyWriteExecute=\nTakes a boolean argument. If set, attempts to create memory mappings that are writable\nand executable at the same time, or to change existing memory mappings to become\nexecutable, or mapping shared memory segments as executable, are prohibited.\nSpecifically, a system call filter is added (or preferably, an equivalent kernel check is\nenabled with prctl(2)) that rejects mmap(2) system calls with both PROTEXEC and\nPROTWRITE set, mprotect(2) or pkeymprotect(2) system calls with PROTEXEC set and\nshmat(2) system calls with SHMEXEC set. Note that this option is incompatible with\nprograms and libraries that generate program code dynamically at runtime, including JIT\nexecution engines, executable stacks, and code \"trampoline\" feature of various C\ncompilers. This option improves service security, as it makes harder for software\nexploits to change running code dynamically. However, the protection can be circumvented,\nif the service can write to a filesystem, which is not mounted with noexec (such as\n/dev/shm), or it can use memfdcreate(). This can be prevented by making such file\nsystems inaccessible to the service (e.g.  InaccessiblePaths=/dev/shm) and installing\nfurther system call filters (SystemCallFilter=~memfdcreate). Note that this feature is\nfully available on x86-64, and partially on x86. Specifically, the shmat() protection is\nnot available on x86. Note that on systems supporting multiple ABIs (such as x86/x86-64)\nit is recommended to turn off alternative ABIs for services, so that they cannot be used\nto circumvent the restrictions of this option. Specifically, it is recommended to combine\nthis option with SystemCallArchitectures=native or similar.\n\nAdded in version 231.\n\nRestrictRealtime=\nTakes a boolean argument. If set, any attempts to enable realtime scheduling in a process\nof the unit are refused. This restricts access to realtime task scheduling policies such\nas SCHEDFIFO, SCHEDRR or SCHEDDEADLINE. See sched(7) for details about these\nscheduling policies. Realtime scheduling policies may be used to monopolize CPU time for\nlonger periods of time, and may hence be used to lock up or otherwise trigger\nDenial-of-Service situations on the system. It is hence recommended to restrict access to\nrealtime scheduling to the few programs that actually require them. Defaults to off.\n\nAdded in version 231.\n\nRestrictSUIDSGID=\nTakes a boolean argument. If set, any attempts to set the set-user-ID (SUID) or\nset-group-ID (SGID) bits on files or directories will be denied (for details on these\nbits see inode(7)). As the SUID/SGID bits are mechanisms to elevate privileges, and allow\nusers to acquire the identity of other users, it is recommended to restrict creation of\nSUID/SGID files to the few programs that actually require them. Note that this restricts\nmarking of any type of file system object with these bits, including both regular files\nand directories (where the SGID is a different meaning than for files, see\ndocumentation). This option is implied if DynamicUser= is enabled. Defaults to off.\n\nAdded in version 242.\n\nRemoveIPC=\nTakes a boolean parameter. If set, all System V and POSIX IPC objects owned by the user\nand group the processes of this unit are run as are removed when the unit is stopped.\nThis setting only has an effect if at least one of User=, Group= and DynamicUser= are\nused. It has no effect on IPC objects owned by the root user. Specifically, this removes\nSystem V semaphores, as well as System V and POSIX shared memory segments and message\nqueues. If multiple units use the same user or group the IPC objects are removed when the\nlast of these units is stopped. This setting is implied if DynamicUser= is set.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 232.\n\nPrivateMounts=\nTakes a boolean parameter. If set, the processes of this unit will be run in their own\nprivate file system (mount) namespace with all mount propagation from the processes\ntowards the host's main file system namespace turned off. This means any file system\nmount points established or removed by the unit's processes will be private to them and\nnot be visible to the host. However, file system mount points established or removed on\nthe host will be propagated to the unit's processes. See mountnamespaces(7) for details\non file system namespaces. Defaults to off.\n\nWhen turned on, this executes three operations for each invoked process: a new\nCLONENEWNS namespace is created, after which all existing mounts are remounted to\nMSSLAVE to disable propagation from the unit's processes to the host (but leaving\npropagation in the opposite direction in effect). Finally, the mounts are remounted again\nto the propagation mode configured with MountFlags=, see below.\n\nFile system namespaces are set up individually for each process forked off by the service\nmanager. Mounts established in the namespace of the process created by ExecStartPre= will\nhence be cleaned up automatically as soon as that process exits and will not be available\nto subsequent processes forked off for ExecStart= (and similar applies to the various\nother commands configured for units). Similarly, JoinsNamespaceOf= does not permit\nsharing kernel mount namespaces between units, it only enables sharing of the /tmp/ and\n/var/tmp/ directories.\n\nOther file system namespace unit settings — PrivateMounts=, PrivateTmp=, PrivateDevices=,\nProtectSystem=, ProtectHome=, ReadOnlyPaths=, InaccessiblePaths=, ReadWritePaths=, ... —\nalso enable file system namespacing in a fashion equivalent to this option. Hence it is\nprimarily useful to explicitly request this behaviour if none of the other settings are\nused.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n\nAdded in version 239.\n\nMountFlags=\nTakes a mount propagation setting: shared, slave or private, which controls whether file\nsystem mount points in the file system namespaces set up for this unit's processes will\nreceive or propagate mounts and unmounts from other file system namespaces. See mount(2)\nfor details on mount propagation, and the three propagation flags in particular.\n\nThis setting only controls the final propagation setting in effect on all mount points of\nthe file system namespace created for each process of this unit. Other file system\nnamespacing unit settings (see the discussion in PrivateMounts= above) will implicitly\ndisable mount and unmount propagation from the unit's processes towards the host by\nchanging the propagation setting of all mount points in the unit's file system namespace\nto slave first. Setting this option to shared does not reestablish propagation in that\ncase.\n\nIf not set – but file system namespaces are enabled through another file system namespace\nunit setting – shared mount propagation is used, but — as mentioned — as slave is applied\nfirst, propagation from the unit's processes to the host is still turned off.\n\nIt is not recommended to use private mount propagation for units, as this means temporary\nmounts (such as removable media) of the host will stay mounted and thus indefinitely busy\nin forked off processes, as unmount propagation events won't be received by the file\nsystem namespace of the unit.\n\nUsually, it is best to leave this setting unmodified, and use higher level file system\nnamespacing options instead, in particular PrivateMounts=, see above.\n\nThis option is only available for system services, or for services running in per-user\ninstances of the service manager in which case PrivateUsers= is implicitly enabled\n(requires unprivileged user namespaces support to be enabled in the kernel via the\n\"kernel.unprivilegedusernsclone=\" sysctl).\n",
            "subsections": []
        },
        "SYSTEM CALL FILTERING": {
            "content": "SystemCallFilter=\nTakes a space-separated list of system call names. If this setting is used, all system\ncalls executed by the unit processes except for the listed ones will result in immediate\nprocess termination with the SIGSYS signal (allow-listing). (See SystemCallErrorNumber=\nbelow for changing the default action). If the first character of the list is \"~\", the\neffect is inverted: only the listed system calls will result in immediate process\ntermination (deny-listing). Deny-listed system calls and system call groups may\noptionally be suffixed with a colon (\":\") and \"errno\" error number (between 0 and 4095)\nor errno name such as EPERM, EACCES or EUCLEAN (see errno(3) for a full list). This value\nwill be returned when a deny-listed system call is triggered, instead of terminating the\nprocesses immediately. Special setting \"kill\" can be used to explicitly specify killing.\nThis value takes precedence over the one given in SystemCallErrorNumber=, see below. This\nfeature makes use of the Secure Computing Mode 2 interfaces of the kernel ('seccomp\nfiltering') and is useful for enforcing a minimal sandboxing environment. Note that the\nexecve(), exit(), exitgroup(), getrlimit(), rtsigreturn(), sigreturn() system calls and\nthe system calls for querying time and sleeping are implicitly allow-listed and do not\nneed to be listed explicitly. This option may be specified more than once, in which case\nthe filter masks are merged. If the empty string is assigned, the filter is reset, all\nprior assignments will have no effect. This does not affect commands prefixed with \"+\".\n\nNote that on systems supporting multiple ABIs (such as x86/x86-64) it is recommended to\nturn off alternative ABIs for services, so that they cannot be used to circumvent the\nrestrictions of this option. Specifically, it is recommended to combine this option with\nSystemCallArchitectures=native or similar.\n\nNote that strict system call filters may impact execution and error handling code paths\nof the service invocation. Specifically, access to the execve() system call is required\nfor the execution of the service binary — if it is blocked service invocation will\nnecessarily fail. Also, if execution of the service binary fails for some reason (for\nexample: missing service executable), the error handling logic might require access to an\nadditional set of system calls in order to process and log this failure correctly. It\nmight be necessary to temporarily disable system call filters in order to simplify\ndebugging of such failures.\n\nIf you specify both types of this option (i.e. allow-listing and deny-listing), the first\nencountered will take precedence and will dictate the default action (termination or\napproval of a system call). Then the next occurrences of this option will add or delete\nthe listed system calls from the set of the filtered system calls, depending of its type\nand the default action. (For example, if you have started with an allow list rule for\nread() and write(), and right after it add a deny list rule for write(), then write()\nwill be removed from the set.)\n\nAs the number of possible system calls is large, predefined sets of system calls are\nprovided. A set starts with \"@\" character, followed by name of the set.\n\nTable 4. Currently predefined system call sets\n┌─────────────────┬───────────────────────────────────┐\n│ Set             │ Description                       │\n├─────────────────┼───────────────────────────────────┤\n│ @aio            │ Asynchronous I/O (iosetup(2),    │\n│                 │ iosubmit(2), and related calls)  │\n├─────────────────┼───────────────────────────────────┤\n│ @basic-io       │ System calls for basic I/O:       │\n│                 │ reading, writing, seeking, file   │\n│                 │ descriptor duplication and        │\n│                 │ closing (read(2), write(2), and   │\n│                 │ related calls)                    │\n├─────────────────┼───────────────────────────────────┤\n│ @chown          │ Changing file ownership           │\n│                 │ (chown(2), fchownat(2), and       │\n│                 │ related calls)                    │\n├─────────────────┼───────────────────────────────────┤\n│ @clock          │ System calls for changing the     │\n│                 │ system clock (adjtimex(2),        │\n│                 │ settimeofday(2), and related      │\n│                 │ calls)                            │\n├─────────────────┼───────────────────────────────────┤\n│ @cpu-emulation  │ System calls for CPU emulation    │\n│                 │ functionality (vm86(2) and        │\n│                 │ related calls)                    │\n├─────────────────┼───────────────────────────────────┤\n│ @debug          │ Debugging, performance monitoring │\n│                 │ and tracing functionality         │\n│                 │ (ptrace(2), perfeventopen(2)    │\n│                 │ and related calls)                │\n├─────────────────┼───────────────────────────────────┤\n│ @file-system    │ File system operations: opening,  │\n│                 │ creating files and directories    │\n│                 │ for read and write, renaming and  │\n│                 │ removing them, reading file       │\n│                 │ properties, or creating hard and  │\n│                 │ symbolic links                    │\n├─────────────────┼───────────────────────────────────┤\n│ @io-event       │ Event loop system calls (poll(2), │\n│                 │ select(2), epoll(7), eventfd(2)   │\n│                 │ and related calls)                │\n├─────────────────┼───────────────────────────────────┤\n│ @ipc            │ Pipes, SysV IPC, POSIX Message    │\n│                 │ Queues and other IPC              │\n│                 │ (mqoverview(7), svipc(7))        │\n├─────────────────┼───────────────────────────────────┤\n│ @keyring        │ Kernel keyring access (keyctl(2)  │\n│                 │ and related calls)                │\n├─────────────────┼───────────────────────────────────┤\n│ @memlock        │ Locking of memory in RAM          │\n│                 │ (mlock(2), mlockall(2) and        │\n│                 │ related calls)                    │\n├─────────────────┼───────────────────────────────────┤\n│ @module         │ Loading and unloading of kernel   │\n│                 │ modules (initmodule(2),          │\n│                 │ deletemodule(2) and related      │\n│                 │ calls)                            │\n├─────────────────┼───────────────────────────────────┤\n│ @mount          │ Mounting and unmounting of file   │\n│                 │ systems (mount(2), chroot(2), and │\n│                 │ related calls)                    │\n├─────────────────┼───────────────────────────────────┤\n│ @network-io     │ Socket I/O (including local       │\n│                 │ AFUNIX): socket(7), unix(7)      │\n├─────────────────┼───────────────────────────────────┤\n│ @obsolete       │ Unusual, obsolete or              │\n│                 │ unimplemented (createmodule(2),  │\n│                 │ gtty(2), ...)                     │\n├─────────────────┼───────────────────────────────────┤\n│ @pkey           │ System calls that deal with       │\n│                 │ memory protection keys (pkeys(7)) │\n├─────────────────┼───────────────────────────────────┤\n│ @privileged     │ All system calls which need       │\n│                 │ super-user capabilities           │\n│                 │ (capabilities(7))                 │\n├─────────────────┼───────────────────────────────────┤\n│ @process        │ Process control, execution,       │\n│                 │ namespacing operations (clone(2), │\n│                 │ kill(2), namespaces(7), ...)      │\n├─────────────────┼───────────────────────────────────┤\n│ @raw-io         │ Raw I/O port access (ioperm(2),   │\n│                 │ iopl(2), pciconfigread(), ...)   │\n├─────────────────┼───────────────────────────────────┤\n│ @reboot         │ System calls for rebooting and    │\n│                 │ reboot preparation (reboot(2),    │\n│                 │ kexec(), ...)                     │\n├─────────────────┼───────────────────────────────────┤\n│ @resources      │ System calls for changing         │\n│                 │ resource limits, memory and       │\n│                 │ scheduling parameters             │\n│                 │ (setrlimit(2), setpriority(2),    │\n│                 │ ...)                              │\n├─────────────────┼───────────────────────────────────┤\n│ @sandbox        │ System calls for sandboxing       │\n│                 │ programs (seccomp(2), Landlock    │\n│                 │ system calls, ...)                │\n├─────────────────┼───────────────────────────────────┤\n│ @setuid         │ System calls for changing user ID │\n│                 │ and group ID credentials,         │\n│                 │ (setuid(2), setgid(2),            │\n│                 │ setresuid(2), ...)                │\n├─────────────────┼───────────────────────────────────┤\n│ @signal         │ System calls for manipulating and │\n│                 │ handling process signals          │\n│                 │ (signal(2), sigprocmask(2), ...)  │\n├─────────────────┼───────────────────────────────────┤\n│ @swap           │ System calls for                  │\n│                 │ enabling/disabling swap devices   │\n│                 │ (swapon(2), swapoff(2))           │\n├─────────────────┼───────────────────────────────────┤\n│ @sync           │ Synchronizing files and memory to │\n│                 │ disk (fsync(2), msync(2), and     │\n│                 │ related calls)                    │\n├─────────────────┼───────────────────────────────────┤\n│ @system-service │ A reasonable set of system calls  │\n│                 │ used by common system services,   │\n│                 │ excluding any special purpose     │\n│                 │ calls. This is the recommended    │\n│                 │ starting point for allow-listing  │\n│                 │ system calls for system services, │\n│                 │ as it contains what is typically  │\n│                 │ needed by system services, but    │\n│                 │ excludes overly specific          │\n│                 │ interfaces. For example, the      │\n│                 │ following APIs are excluded:      │\n│                 │ \"@clock\", \"@mount\", \"@swap\",      │\n│                 │ \"@reboot\".                        │\n├─────────────────┼───────────────────────────────────┤\n│ @timer          │ System calls for scheduling       │\n│                 │ operations by time (alarm(2),     │\n│                 │ timercreate(2), ...)             │\n├─────────────────┼───────────────────────────────────┤\n│ @known          │ All system calls defined by the   │\n│                 │ kernel. This list is defined      │\n│                 │ statically in systemd based on a  │\n│                 │ kernel version that was available │\n│                 │ when this systemd version was     │\n│                 │ released. It will become          │\n│                 │ progressively more out-of-date as │\n│                 │ the kernel is updated.            │\n└─────────────────┴───────────────────────────────────┘\n\nNote, that as new system calls are added to the kernel, additional system calls might be\nadded to the groups above. Contents of the sets may also change between systemd versions.\nIn addition, the list of system calls depends on the kernel version and architecture for\nwhich systemd was compiled. Use systemd-analyze syscall-filter to list the actual list of\nsystem calls in each filter.\n\nGenerally, allow-listing system calls (rather than deny-listing) is the safer mode of\noperation. It is recommended to enforce system call allow lists for all long-running\nsystem services. Specifically, the following lines are a relatively safe basic choice for\nthe majority of system services:\n\n[Service]\nSystemCallFilter=@system-service\nSystemCallErrorNumber=EPERM\n\nNote that various kernel system calls are defined redundantly: there are multiple system\ncalls for executing the same operation. For example, the pidfdsendsignal() system call\nmay be used to execute operations similar to what can be done with the older kill()\nsystem call, hence blocking the latter without the former only provides weak protection.\nSince new system calls are added regularly to the kernel as development progresses,\nkeeping system call deny lists comprehensive requires constant work. It is thus\nrecommended to use allow-listing instead, which offers the benefit that new system calls\nare by default implicitly blocked until the allow list is updated.\n\nAlso note that a number of system calls are required to be accessible for the dynamic\nlinker to work. The dynamic linker is required for running most regular programs\n(specifically: all dynamic ELF binaries, which is how most distributions build packaged\nprograms). This means that blocking these system calls (which include open(), openat() or\nmmap()) will make most programs typically shipped with generic distributions unusable.\n\nIt is recommended to combine the file system namespacing related options with\nSystemCallFilter=~@mount, in order to prohibit the unit's processes to undo the mappings.\nSpecifically these are the options PrivateTmp=, PrivateDevices=, ProtectSystem=,\nProtectHome=, ProtectKernelTunables=, ProtectControlGroups=, ProtectKernelLogs=,\nProtectClock=, ReadOnlyPaths=, InaccessiblePaths= and ReadWritePaths=.\n\nAdded in version 187.\n\nSystemCallErrorNumber=\nTakes an \"errno\" error number (between 1 and 4095) or errno name such as EPERM, EACCES or\nEUCLEAN, to return when the system call filter configured with SystemCallFilter= is\ntriggered, instead of terminating the process immediately. See errno(3) for a full list\nof error codes. When this setting is not used, or when the empty string or the special\nsetting \"kill\" is assigned, the process will be terminated immediately when the filter is\ntriggered.\n\nAdded in version 209.\n\nSystemCallArchitectures=\nTakes a space-separated list of architecture identifiers to include in the system call\nfilter. The known architecture identifiers are the same as for ConditionArchitecture=\ndescribed in systemd.unit(5), as well as x32, mips64-n32, mips64-le-n32, and the special\nidentifier native. The special identifier native implicitly maps to the native\narchitecture of the system (or more precisely: to the architecture the system manager is\ncompiled for). By default, this option is set to the empty list, i.e. no filtering is\napplied.\n\nIf this setting is used, processes of this unit will only be permitted to call native\nsystem calls, and system calls of the specified architectures. For the purposes of this\noption, the x32 architecture is treated as including x86-64 system calls. However, this\nsetting still fulfills its purpose, as explained below, on x32.\n\nSystem call filtering is not equally effective on all architectures. For example, on x86\nfiltering of network socket-related calls is not possible, due to ABI limitations — a\nlimitation that x86-64 does not have, however. On systems supporting multiple ABIs at the\nsame time — such as x86/x86-64 — it is hence recommended to limit the set of permitted\nsystem call architectures so that secondary ABIs may not be used to circumvent the\nrestrictions applied to the native ABI of the system. In particular, setting\nSystemCallArchitectures=native is a good choice for disabling non-native ABIs.\n\nSystem call architectures may also be restricted system-wide via the\nSystemCallArchitectures= option in the global configuration. See systemd-system.conf(5)\nfor details.\n\nAdded in version 209.\n\nSystemCallLog=\nTakes a space-separated list of system call names. If this setting is used, all system\ncalls executed by the unit processes for the listed ones will be logged. If the first\ncharacter of the list is \"~\", the effect is inverted: all system calls except the listed\nsystem calls will be logged. This feature makes use of the Secure Computing Mode 2\ninterfaces of the kernel ('seccomp filtering') and is useful for auditing or setting up a\nminimal sandboxing environment. This option may be specified more than once, in which\ncase the filter masks are merged. If the empty string is assigned, the filter is reset,\nall prior assignments will have no effect. This does not affect commands prefixed with\n\"+\".\n\nAdded in version 247.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "Environment=\nSets environment variables for executed processes. Each line is unquoted using the rules\ndescribed in \"Quoting\" section in systemd.syntax(7) and becomes a list of variable\nassignments. If you need to assign a value containing spaces or the equals sign to a\nvariable, put quotes around the whole assignment. Variable expansion is not performed\ninside the strings and the \"$\" character has no special meaning. Specifier expansion is\nperformed, see the \"Specifiers\" section in systemd.unit(5).\n\nThis option may be specified more than once, in which case all listed variables will be\nset. If the same variable is listed twice, the later setting will override the earlier\nsetting. If the empty string is assigned to this option, the list of environment\nvariables is reset, all prior assignments have no effect.\n\nThe names of the variables can contain ASCII letters, digits, and the underscore\ncharacter. Variable names cannot be empty or start with a digit. In variable values, most\ncharacters are allowed, but non-printable characters are currently rejected.\n\nExample:\n\nEnvironment=\"VAR1=word1 word2\" VAR2=word3 \"VAR3=$word 5 6\"\n\ngives three variables \"VAR1\", \"VAR2\", \"VAR3\" with the values \"word1 word2\", \"word3\",\n\"$word 5 6\".\n\nSee environ(7) for details about environment variables.\n\nNote that environment variables are not suitable for passing secrets (such as passwords,\nkey material, ...) to service processes. Environment variables set for a unit are exposed\nto unprivileged clients via D-Bus IPC, and generally not understood as being data that\nrequires protection. Moreover, environment variables are propagated down the process\ntree, including across security boundaries (such as setuid/setgid executables), and hence\nmight leak to processes that should not have access to the secret data. Use\nLoadCredential=, LoadCredentialEncrypted= or SetCredentialEncrypted= (see below) to pass\ndata to unit processes securely.\n\nEnvironmentFile=\nSimilar to Environment=, but reads the environment variables from a text file. The text\nfile should contain newline-separated variable assignments. Empty lines, lines without an\n\"=\" separator, or lines starting with \";\" or \"#\" will be ignored, which may be used for\ncommenting. The file must be encoded with UTF-8. Valid characters are unicode scalar\nvalues[8] other than unicode noncharacters[9], U+0000 NUL, and U+FEFF unicode byte order\nmark[10]. Control codes other than NUL are allowed.\n\nIn the file, an unquoted value after the \"=\" is parsed with the same backslash-escape\nrules as POSIX shell unquoted text[11], but unlike in a shell, interior whitespace is\npreserved and quotes after the first non-whitespace character are preserved. Leading and\ntrailing whitespace (space, tab, carriage return) is discarded, but interior whitespace\nwithin the line is preserved verbatim. A line ending with a backslash will be continued\nto the following one, with the newline itself discarded. A backslash \"\\\" followed by any\ncharacter other than newline will preserve the following character, so that \"\\\\\" will\nbecome the value \"\\\".\n\nIn the file, a \"'\"-quoted value after the \"=\" can span multiple lines and contain any\ncharacter verbatim other than single quote, like POSIX shell single-quoted text[12]. No\nbackslash-escape sequences are recognized. Leading and trailing whitespace outside of the\nsingle quotes is discarded.\n\nIn the file, a \"\"\"-quoted value after the \"=\" can span multiple lines, and the same\nescape sequences are recognized as in POSIX shell double-quoted text[13]. Backslash (\"\\\")\nfollowed by any of \"\"\\`$\" will preserve that character. A backslash followed by newline\nis a line continuation, and the newline itself is discarded. A backslash followed by any\nother character is ignored; both the backslash and the following character are preserved\nverbatim. Leading and trailing whitespace outside of the double quotes is discarded.\n\nThe argument passed should be an absolute filename or wildcard expression, optionally\nprefixed with \"-\", which indicates that if the file does not exist, it will not be read\nand no error or warning message is logged. This option may be specified more than once in\nwhich case all specified files are read. If the empty string is assigned to this option,\nthe list of file to read is reset, all prior assignments have no effect.\n\nThe files listed with this directive will be read shortly before the process is executed\n(more specifically, after all processes from a previous unit state terminated. This means\nyou can generate these files in one unit state, and read it with this option in the next.\nThe files are read from the file system of the service manager, before any file system\nchanges like bind mounts take place).\n\nSettings from these files override settings made with Environment=. If the same variable\nis set twice from these files, the files will be read in the order they are specified and\nthe later setting will override the earlier setting.\n\nPassEnvironment=\nPass environment variables set for the system service manager to executed processes.\nTakes a space-separated list of variable names. This option may be specified more than\nonce, in which case all listed variables will be passed. If the empty string is assigned\nto this option, the list of environment variables to pass is reset, all prior assignments\nhave no effect. Variables specified that are not set for the system manager will not be\npassed and will be silently ignored. Note that this option is only relevant for the\nsystem service manager, as system services by default do not automatically inherit any\nenvironment variables set for the service manager itself. However, in case of the user\nservice manager all environment variables are passed to the executed processes anyway,\nhence this option is without effect for the user service manager.\n\nVariables set for invoked processes due to this setting are subject to being overridden\nby those configured with Environment= or EnvironmentFile=.\n\nExample:\n\nPassEnvironment=VAR1 VAR2 VAR3\n\npasses three variables \"VAR1\", \"VAR2\", \"VAR3\" with the values set for those variables in\nPID1.\n\nSee environ(7) for details about environment variables.\n\nAdded in version 228.\n\nUnsetEnvironment=\nExplicitly unset environment variable assignments that would normally be passed from the\nservice manager to invoked processes of this unit. Takes a space-separated list of\nvariable names or variable assignments. This option may be specified more than once, in\nwhich case all listed variables/assignments will be unset. If the empty string is\nassigned to this option, the list of environment variables/assignments to unset is reset.\nIf a variable assignment is specified (that is: a variable name, followed by \"=\",\nfollowed by its value), then any environment variable matching this precise assignment is\nremoved. If a variable name is specified (that is a variable name without any following\n\"=\" or value), then any assignment matching the variable name, regardless of its value is\nremoved. Note that the effect of UnsetEnvironment= is applied as final step when the\nenvironment list passed to executed processes is compiled. That means it may undo\nassignments from any configuration source, including assignments made through\nEnvironment= or EnvironmentFile=, inherited from the system manager's global set of\nenvironment variables, inherited via PassEnvironment=, set by the service manager itself\n(such as $NOTIFYSOCKET and such), or set by a PAM module (in case PAMName= is used).\n\nSee \"Environment Variables in Spawned Processes\" below for a description of how those\nsettings combine to form the inherited environment. See environ(7) for general\ninformation about environment variables.\n\nAdded in version 235.\n",
            "subsections": []
        },
        "LOGGING AND STANDARD INPUT/OUTPUT": {
            "content": "StandardInput=\nControls where file descriptor 0 (STDIN) of the executed processes is connected to. Takes\none of null, tty, tty-force, tty-fail, data, file:path, socket or fd:name.\n\nIf null is selected, standard input will be connected to /dev/null, i.e. all read\nattempts by the process will result in immediate EOF.\n\nIf tty is selected, standard input is connected to a TTY (as configured by TTYPath=, see\nbelow) and the executed process becomes the controlling process of the terminal. If the\nterminal is already being controlled by another process, the executed process waits until\nthe current controlling process releases the terminal.\n\ntty-force is similar to tty, but the executed process is forcefully and immediately made\nthe controlling process of the terminal, potentially removing previous controlling\nprocesses from the terminal.\n\ntty-fail is similar to tty, but if the terminal already has a controlling process\nstart-up of the executed process fails.\n\nThe data option may be used to configure arbitrary textual or binary data to pass via\nstandard input to the executed process. The data to pass is configured via\nStandardInputText=/StandardInputData= (see below). Note that the actual file descriptor\ntype passed (memory file, regular file, UNIX pipe, ...) might depend on the kernel and\navailable privileges. In any case, the file descriptor is read-only, and when read\nreturns the specified data followed by EOF.\n\nThe file:path option may be used to connect a specific file system object to standard\ninput. An absolute path following the \":\" character is expected, which may refer to a\nregular file, a FIFO or special file. If an AFUNIX socket in the file system is\nspecified, a stream socket is connected to it. The latter is useful for connecting\nstandard input of processes to arbitrary system services.\n\nThe socket option is valid in socket-activated services only, and requires the relevant\nsocket unit file (see systemd.socket(5) for details) to have Accept=yes set, or to\nspecify a single socket only. If this option is set, standard input will be connected to\nthe socket the service was activated from, which is primarily useful for compatibility\nwith daemons designed for use with the traditional inetd(8) socket activation daemon\n($LISTENFDS (and related) environment variables are not passed when socket value is\nconfigured).\n\nThe fd:name option connects standard input to a specific, named file descriptor provided\nby a socket unit. The name may be specified as part of this option, following a \":\"\ncharacter (e.g.  \"fd:foobar\"). If no name is specified, the name \"stdin\" is implied (i.e.\n\"fd\" is equivalent to \"fd:stdin\"). At least one socket unit defining the specified name\nmust be provided via the Sockets= option, and the file descriptor name may differ from\nthe name of its containing socket unit. If multiple matches are found, the first one will\nbe used. See FileDescriptorName= in systemd.socket(5) for more details about named file\ndescriptors and their ordering.\n\nThis setting defaults to null, unless StandardInputText=/StandardInputData= are set, in\nwhich case it defaults to data.\n\nStandardOutput=\nControls where file descriptor 1 (stdout) of the executed processes is connected to.\nTakes one of inherit, null, tty, journal, kmsg, journal+console, kmsg+console, file:path,\nappend:path, truncate:path, socket or fd:name.\n\ninherit duplicates the file descriptor of standard input for standard output.\n\nnull connects standard output to /dev/null, i.e. everything written to it will be lost.\n\ntty connects standard output to a tty (as configured via TTYPath=, see below). If the TTY\nis used for output only, the executed process will not become the controlling process of\nthe terminal, and will not fail or wait for other processes to release the terminal.\n\njournal connects standard output with the journal, which is accessible via journalctl(1).\nNote that everything that is written to kmsg (see below) is implicitly stored in the\njournal as well, the specific option listed below is hence a superset of this one. (Also\nnote that any external, additional syslog daemons receive their log data from the\njournal, too, hence this is the option to use when logging shall be processed with such a\ndaemon.)\n\nkmsg connects standard output with the kernel log buffer which is accessible via\ndmesg(1), in addition to the journal. The journal daemon might be configured to send all\nlogs to kmsg anyway, in which case this option is no different from journal.\n\njournal+console and kmsg+console work in a similar way as the two options above but copy\nthe output to the system console as well.\n\nThe file:path option may be used to connect a specific file system object to standard\noutput. The semantics are similar to the same option of StandardInput=, see above. If\npath refers to a regular file on the filesystem, it is opened (created if it doesn't\nexist yet) for writing at the beginning of the file, but without truncating it. If\nstandard input and output are directed to the same file path, it is opened only once —\nfor reading as well as writing — and duplicated. This is particularly useful when the\nspecified path refers to an AFUNIX socket in the file system, as in that case only a\nsingle stream connection is created for both input and output.\n\nappend:path is similar to file:path above, but it opens the file in append mode.\n\ntruncate:path is similar to file:path above, but it truncates the file when opening it.\nFor units with multiple command lines, e.g.  Type=oneshot services with multiple\nExecStart=, or services with ExecCondition=, ExecStartPre= or ExecStartPost=, the output\nfile is reopened and therefore re-truncated for each command line. If the output file is\ntruncated while another process still has the file open, e.g. by an ExecReload= running\nconcurrently with an ExecStart=, and the other process continues writing to the file\nwithout adjusting its offset, then the space between the file pointers of the two\nprocesses may be filled with NUL bytes, producing a sparse file. Thus, truncate:path is\ntypically only useful for units where only one process runs at a time, such as services\nwith a single ExecStart= and no ExecStartPost=, ExecReload=, ExecStop= or similar.\n\nsocket connects standard output to a socket acquired via socket activation. The semantics\nare similar to the same option of StandardInput=, see above.\n\nThe fd:name option connects standard output to a specific, named file descriptor provided\nby a socket unit. A name may be specified as part of this option, following a \":\"\ncharacter (e.g.  \"fd:foobar\"). If no name is specified, the name \"stdout\" is implied\n(i.e.  \"fd\" is equivalent to \"fd:stdout\"). At least one socket unit defining the\nspecified name must be provided via the Sockets= option, and the file descriptor name may\ndiffer from the name of its containing socket unit. If multiple matches are found, the\nfirst one will be used. See FileDescriptorName= in systemd.socket(5) for more details\nabout named descriptors and their ordering.\n\nIf the standard output (or error output, see below) of a unit is connected to the journal\nor the kernel log buffer, the unit will implicitly gain a dependency of type After= on\nsystemd-journald.socket (also see the \"Implicit Dependencies\" section above). Also note\nthat in this case stdout (or stderr, see below) will be an AFUNIX stream socket, and not\na pipe or FIFO that can be re-opened. This means when executing shell scripts the\nconstruct echo \"hello\" > /dev/stderr for writing text to stderr will not work. To\nmitigate this use the construct echo \"hello\" >&2 instead, which is mostly equivalent and\navoids this pitfall.\n\nIf StandardInput= is set to one of tty, tty-force, tty-fail, socket, or fd:name, this\nsetting defaults to inherit.\n\nIn other cases, this setting defaults to the value set with DefaultStandardOutput= in\nsystemd-system.conf(5), which defaults to journal. Note that setting this parameter might\nresult in additional dependencies to be added to the unit (see above).\n\nStandardError=\nControls where file descriptor 2 (stderr) of the executed processes is connected to. The\navailable options are identical to those of StandardOutput=, with some exceptions: if set\nto inherit the file descriptor used for standard output is duplicated for standard error,\nwhile fd:name will use a default file descriptor name of \"stderr\".\n\nThis setting defaults to the value set with DefaultStandardError= in systemd-\nsystem.conf(5), which defaults to inherit. Note that setting this parameter might result\nin additional dependencies to be added to the unit (see above).\n\nStandardInputText=, StandardInputData=\nConfigures arbitrary textual or binary data to pass via file descriptor 0 (STDIN) to the\nexecuted processes. These settings have no effect unless StandardInput= is set to data\n(which is the default if StandardInput= is not set otherwise, but\nStandardInputText=/StandardInputData= is). Use this option to embed process input data\ndirectly in the unit file.\n\nStandardInputText= accepts arbitrary textual data. C-style escapes for special characters\nas well as the usual \"%\"-specifiers are resolved. Each time this setting is used the\nspecified text is appended to the per-unit data buffer, followed by a newline character\n(thus every use appends a new line to the end of the buffer). Note that leading and\ntrailing whitespace of lines configured with this option is removed. If an empty line is\nspecified the buffer is cleared (hence, in order to insert an empty line, add an\nadditional \"\\n\" to the end or beginning of a line).\n\nStandardInputData= accepts arbitrary binary data, encoded in Base64[14]. No escape\nsequences or specifiers are resolved. Any whitespace in the encoded version is ignored\nduring decoding.\n\nNote that StandardInputText= and StandardInputData= operate on the same data buffer, and\nmay be mixed in order to configure both binary and textual data for the same input\nstream. The textual or binary data is joined strictly in the order the settings appear in\nthe unit file. Assigning an empty string to either will reset the data buffer.\n\nPlease keep in mind that in order to maintain readability long unit file settings may be\nsplit into multiple lines, by suffixing each line (except for the last) with a \"\\\"\ncharacter (see systemd.unit(5) for details). This is particularly useful for large data\nconfigured with these two options. Example:\n\n...\nStandardInput=data\nStandardInputData=V2XigLJyZSBubyBzdHJhbmdlcnMgdG8gbG92ZQpZb3Uga25vdyB0aGUgcnVsZXMgYW5kIHNvIGRv \\\nIEkKQSBmdWxsIGNvbW1pdG1lbnQncyB3aGF0IEnigLJtIHRoaW5raW5nIG9mCllvdSB3b3VsZG4n \\\ndCBnZXQgdGhpcyBmcm9tIGFueSBvdGhlciBndXkKSSBqdXN0IHdhbm5hIHRlbGwgeW91IGhvdyBJ \\\nJ20gZmVlbGluZwpHb3R0YSBtYWtlIHlvdSB1bmRlcnN0YW5kCgpOZXZlciBnb25uYSBnaXZlIHlv \\\ndSB1cApOZXZlciBnb25uYSBsZXQgeW91IGRvd24KTmV2ZXIgZ29ubmEgcnVuIGFyb3VuZCBhbmQg \\\nZGVzZXJ0IHlvdQpOZXZlciBnb25uYSBtYWtlIHlvdSBjcnkKTmV2ZXIgZ29ubmEgc2F5IGdvb2Ri \\\neWUKTmV2ZXIgZ29ubmEgdGVsbCBhIGxpZSBhbmQgaHVydCB5b3UK\n...\n\nAdded in version 236.\n\nLogLevelMax=\nConfigures filtering by log level of log messages generated by this unit. Takes a syslog\nlog level, one of emerg (lowest log level, only highest priority messages), alert, crit,\nerr, warning, notice, info, debug (highest log level, also lowest priority messages). See\nsyslog(3) for details. By default no filtering is applied (i.e. the default maximum log\nlevel is debug). Use this option to configure the logging system to drop log messages of\na specific service above the specified level. For example, set LogLevelMax=info in order\nto turn off debug logging of a particularly chatty unit. Note that the configured level\nis applied to any log messages written by any of the processes belonging to this unit, as\nwell as any log messages written by the system manager process (PID 1) in reference to\nthis unit, sent via any supported logging protocol. The filtering is applied early in the\nlogging pipeline, before any kind of further processing is done. Moreover, messages which\npass through this filter successfully might still be dropped by filters applied at a\nlater stage in the logging subsystem. For example, MaxLevelStore= configured in\njournald.conf(5) might prohibit messages of higher log levels to be stored on disk, even\nthough the per-unit LogLevelMax= permitted it to be processed.\n\nAdded in version 236.\n\nLogExtraFields=\nConfigures additional log metadata fields to include in all log records generated by\nprocesses associated with this unit, including systemd. This setting takes one or more\njournal field assignments in the format \"FIELD=VALUE\" separated by whitespace. See\nsystemd.journal-fields(7) for details on the journal field concept. Even though the\nunderlying journal implementation permits binary field values, this setting accepts only\nvalid UTF-8 values. To include space characters in a journal field value, enclose the\nassignment in double quotes (\").  The usual specifiers are expanded in all assignments\n(see below). Note that this setting is not only useful for attaching additional metadata\nto log records of a unit, but given that all fields and values are indexed may also be\nused to implement cross-unit log record matching. Assign an empty string to reset the\nlist.\n\nAdded in version 236.\n\nLogRateLimitIntervalSec=, LogRateLimitBurst=\nConfigures the rate limiting that is applied to log messages generated by this unit. If,\nin the time interval defined by LogRateLimitIntervalSec=, more messages than specified in\nLogRateLimitBurst= are logged by a service, all further messages within the interval are\ndropped until the interval is over. A message about the number of dropped messages is\ngenerated. The time specification for LogRateLimitIntervalSec= may be specified in the\nfollowing units: \"s\", \"min\", \"h\", \"ms\", \"us\". See systemd.time(7) for details. The\ndefault settings are set by RateLimitIntervalSec= and RateLimitBurst= configured in\njournald.conf(5). Note that this only applies to log messages that are processed by the\nlogging subsystem, i.e. by systemd-journald.service(8). This means that if you connect a\nservice's stderr directly to a file via StandardOutput=file:...  or a similar setting,\nthe rate limiting will not be applied to messages written that way (but it will be\nenforced for messages generated via syslog(3) and similar functions).\n\nAdded in version 240.\n\nLogFilterPatterns=\nDefine an extended regular expression to filter log messages based on the MESSAGE= field\nof the structured message. If the first character of the pattern is \"~\", log entries\nmatching the pattern should be discarded. This option takes a single pattern as an\nargument but can be used multiple times to create a list of allowed and denied patterns.\nIf the empty string is assigned, the filter is reset, and all prior assignments will have\nno effect.\n\nBecause the \"~\" character is used to define denied patterns, it must be replaced with\n\"\\x7e\" to allow a message starting with \"~\". For example, \"~foobar\" would add a pattern\nmatching \"foobar\" to the deny list, while \"\\x7efoobar\" would add a pattern matching\n\"~foobar\" to the allow list.\n\nLog messages are tested against denied patterns (if any), then against allowed patterns\n(if any). If a log message matches any of the denied patterns, it will be discarded,\nwhatever the allowed patterns. Then, remaining log messages are tested against allowed\npatterns. Messages matching against none of the allowed pattern are discarded. If no\nallowed patterns are defined, then all messages are processed directly after going\nthrough denied filters.\n\nFiltering is based on the unit for which LogFilterPatterns= is defined, meaning log\nmessages coming from systemd(1) about the unit are not taken into account. Filtered log\nmessages won't be forwarded to traditional syslog daemons, the kernel log buffer (kmsg),\nthe systemd console, or sent as wall messages to all logged-in users.\n\nAdded in version 253.\n\nLogNamespace=\nRun the unit's processes in the specified journal namespace. Expects a short user-defined\nstring identifying the namespace. If not used the processes of the service are run in the\ndefault journal namespace, i.e. their log stream is collected and processed by\nsystemd-journald.service. If this option is used any log data generated by processes of\nthis unit (regardless if via the syslog(), journal native logging or stdout/stderr\nlogging) is collected and processed by an instance of the systemd-journald@.service\ntemplate unit, which manages the specified namespace. The log data is stored in a data\nstore independent from the default log namespace's data store. See systemd-\njournald.service(8) for details about journal namespaces.\n\nInternally, journal namespaces are implemented through Linux mount namespacing and\nover-mounting the directory that contains the relevant AFUNIX sockets used for logging\nin the unit's mount namespace. Since mount namespaces are used this setting disconnects\npropagation of mounts from the unit's processes to the host, similarly to how\nReadOnlyPaths= and similar settings describe above work. Journal namespaces may hence not\nbe used for services that need to establish mount points on the host.\n\nWhen this option is used the unit will automatically gain ordering and requirement\ndependencies on the two socket units associated with the systemd-journald@.service\ninstance so that they are automatically established prior to the unit starting up. Note\nthat when this option is used log output of this service does not appear in the regular\njournalctl(1) output, unless the --namespace= option is used.\n\nThis option is only available for system services and is not supported for services\nrunning in per-user instances of the service manager.\n\nAdded in version 245.\n\nSyslogIdentifier=\nSets the process name (\"syslog tag\") to prefix log lines sent to the logging system or\nthe kernel log buffer with. If not set, defaults to the process name of the executed\nprocess. This option is only useful when StandardOutput= or StandardError= are set to\njournal or kmsg (or to the same settings in combination with +console) and only applies\nto log messages written to stdout or stderr.\n\nSyslogFacility=\nSets the syslog facility identifier to use when logging. One of kern, user, mail, daemon,\nauth, syslog, lpr, news, uucp, cron, authpriv, ftp, local0, local1, local2, local3,\nlocal4, local5, local6 or local7. See syslog(3) for details. This option is only useful\nwhen StandardOutput= or StandardError= are set to journal or kmsg (or to the same\nsettings in combination with +console), and only applies to log messages written to\nstdout or stderr. Defaults to daemon.\n\nSyslogLevel=\nThe default syslog log level to use when logging to the logging system or the kernel log\nbuffer. One of emerg, alert, crit, err, warning, notice, info, debug. See syslog(3) for\ndetails. This option is only useful when StandardOutput= or StandardError= are set to\njournal or kmsg (or to the same settings in combination with +console), and only applies\nto log messages written to stdout or stderr. Note that individual lines output by\nexecuted processes may be prefixed with a different log level which can be used to\noverride the default log level specified here. The interpretation of these prefixes may\nbe disabled with SyslogLevelPrefix=, see below. For details, see sd-daemon(3). Defaults\nto info.\n\nSyslogLevelPrefix=\nTakes a boolean argument. If true and StandardOutput= or StandardError= are set to\njournal or kmsg (or to the same settings in combination with +console), log lines written\nby the executed process that are prefixed with a log level will be processed with this\nlog level set but the prefix removed. If set to false, the interpretation of these\nprefixes is disabled and the logged lines are passed on as-is. This only applies to log\nmessages written to stdout or stderr. For details about this prefixing see sd-daemon(3).\nDefaults to true.\n\nTTYPath=\nSets the terminal device node to use if standard input, output, or error are connected to\na TTY (see above). Defaults to /dev/console.\n\nTTYReset=\nReset the terminal device specified with TTYPath= before and after execution. Defaults to\n\"no\".\n\nTTYVHangup=\nDisconnect all clients which have opened the terminal device specified with TTYPath=\nbefore and after execution. Defaults to \"no\".\n\nTTYRows=, TTYColumns=\nConfigure the size of the TTY specified with TTYPath=. If unset or set to the empty\nstring, the kernel default is used.\n\nAdded in version 250.\n\nTTYVTDisallocate=\nIf the terminal device specified with TTYPath= is a virtual console terminal, try to\ndeallocate the TTY before and after execution. This ensures that the screen and\nscrollback buffer is cleared. Defaults to \"no\".\n",
            "subsections": []
        },
        "CREDENTIALS": {
            "content": "LoadCredential=ID[:PATH], LoadCredentialEncrypted=ID[:PATH]\nPass a credential to the unit. Credentials are limited-size binary or textual objects\nthat may be passed to unit processes. They are primarily used for passing cryptographic\nkeys (both public and private) or certificates, user account information or identity\ninformation from host to services. The data is accessible from the unit's processes via\nthe file system, at a read-only location that (if possible and permitted) is backed by\nnon-swappable memory. The data is only accessible to the user associated with the unit,\nvia the User=/DynamicUser= settings (as well as the superuser). When available, the\nlocation of credentials is exported as the $CREDENTIALSDIRECTORY environment variable to\nthe unit's processes.\n\nThe LoadCredential= setting takes a textual ID to use as name for a credential plus a\nfile system path, separated by a colon. The ID must be a short ASCII string suitable as\nfilename in the filesystem, and may be chosen freely by the user. If the specified path\nis absolute it is opened as regular file and the credential data is read from it. If the\nabsolute path refers to an AFUNIX stream socket in the file system a connection is made\nto it (only once at unit start-up) and the credential data read from the connection,\nproviding an easy IPC integration point for dynamically transferring credentials from\nother services.\n\nIf the specified path is not absolute and itself qualifies as valid credential identifier\nit is attempted to find a credential that the service manager itself received under the\nspecified name — which may be used to propagate credentials from an invoking environment\n(e.g. a container manager that invoked the service manager) into a service. If no\nmatching system credential is found, the directories /etc/credstore/, /run/credstore/ and\n/usr/lib/credstore/ are searched for files under the credential's name — which hence are\nrecommended locations for credential data on disk. If LoadCredentialEncrypted= is used\n/run/credstore.encrypted/, /etc/credstore.encrypted/, and /usr/lib/credstore.encrypted/\nare searched as well.\n\nIf the file system path is omitted it is chosen identical to the credential name, i.e.\nthis is a terse way to declare credentials to inherit from the service manager into a\nservice. This option may be used multiple times, each time defining an additional\ncredential to pass to the unit.\n\nIf an absolute path referring to a directory is specified, every file in that directory\n(recursively) will be loaded as a separate credential. The ID for each credential will be\nthe provided ID suffixed with \"$FILENAME\" (e.g., \"Keyfile1\"). When loading from a\ndirectory, symlinks will be ignored.\n\nThe contents of the file/socket may be arbitrary binary or textual data, including\nnewline characters and NUL bytes.\n\nThe LoadCredentialEncrypted= setting is identical to LoadCredential=, except that the\ncredential data is decrypted and authenticated before being passed on to the executed\nprocesses. Specifically, the referenced path should refer to a file or socket with an\nencrypted credential, as implemented by systemd-creds(1). This credential is loaded,\ndecrypted, authenticated and then passed to the application in plaintext form, in the\nsame way a regular credential specified via LoadCredential= would be. A credential\nconfigured this way may be symmetrically encrypted/authenticated with a secret key\nderived from the system's TPM2 security chip, or with a secret key stored in\n/var/lib/systemd/credentials.secret, or with both. Using encrypted and authenticated\ncredentials improves security as credentials are not stored in plaintext and only\nauthenticated and decrypted into plaintext the moment a service requiring them is\nstarted. Moreover, credentials may be bound to the local hardware and installations, so\nthat they cannot easily be analyzed offline, or be generated externally. When\nDevicePolicy= is set to \"closed\" or \"strict\", or set to \"auto\" and DeviceAllow= is set,\nor PrivateDevices= is set, then this setting adds /dev/tpmrm0 with rw mode to\nDeviceAllow=. See systemd.resource-control(5) for the details about DevicePolicy= or\nDeviceAllow=.\n\nThe credential files/IPC sockets must be accessible to the service manager, but don't\nhave to be directly accessible to the unit's processes: the credential data is read and\ncopied into separate, read-only copies for the unit that are accessible to appropriately\nprivileged processes. This is particularly useful in combination with DynamicUser= as\nthis way privileged data can be made available to processes running under a dynamic UID\n(i.e. not a previously known one) without having to open up access to all users.\n\nIn order to reference the path a credential may be read from within a ExecStart= command\nline use \"${CREDENTIALSDIRECTORY}/mycred\", e.g.  \"ExecStart=cat\n${CREDENTIALSDIRECTORY}/mycred\". In order to reference the path a credential may be read\nfrom within a Environment= line use \"%d/mycred\", e.g.\n\"Environment=MYCREDPATH=%d/mycred\". For system services the path may also be referenced\nas \"/run/credentials/UNITNAME\" in cases where no interpolation is possible, e.g.\nconfiguration files of software that does not yet support credentials natively.\n$CREDENTIALSDIRECTORY is considered the primary interface to look for credentials,\nthough, since it also works for user services.\n\nCurrently, an accumulated credential size limit of 1 MB per unit is enforced.\n\nThe service manager itself may receive system credentials that can be propagated to\nservices from a hosting container manager or VM hypervisor. See the Container\nInterface[15] documentation for details about the former. For the latter, pass\nDMI/SMBIOS[16] OEM string table entries (field type 11) with a prefix of\n\"io.systemd.credential:\" or \"io.systemd.credential.binary:\". In both cases a key/value\npair separated by \"=\" is expected, in the latter case the right-hand side is Base64\ndecoded when parsed (thus permitting binary data to be passed in). Example qemu[17]\nswitch: \"-smbios type=11,value=io.systemd.credential:xx=yy\", or \"-smbios\ntype=11,value=io.systemd.credential.binary:rick=TmV2ZXIgR29ubmEgR2l2ZSBZb3UgVXA=\".\nAlternatively, use the qemu \"fwcfg\" node \"opt/io.systemd.credentials/\". Example qemu\nswitch: \"-fwcfg name=opt/io.systemd.credentials/mycred,string=supersecret\". They may\nalso be passed from the UEFI firmware environment via systemd-stub(7), from the initrd\n(see systemd(1)), or be specified on the kernel command line using the\n\"systemd.setcredential=\" and \"systemd.setcredentialbinary=\" switches (see systemd(1) –\nthis is not recommended since unprivileged userspace can read the kernel command line).\n\nIf referencing an AFUNIX stream socket to connect to, the connection will originate from\nan abstract namespace socket, that includes information about the unit and the credential\nID in its socket name. Use getpeername(2) to query this information. The returned socket\nname is formatted as NUL RANDOM \"/unit/\" UNIT \"/\" ID, i.e. a NUL byte (as required for\nabstract namespace socket names), followed by a random string (consisting of alphadecimal\ncharacters), followed by the literal string \"/unit/\", followed by the requesting unit\nname, followed by the literal character \"/\", followed by the textual credential ID\nrequested. Example: \"\\0adf9d86b6eda275e/unit/foobar.service/credx\" in case the credential\n\"credx\" is requested for a unit \"foobar.service\". This functionality is useful for using\na single listening socket to serve credentials to multiple consumers.\n\nFor further information see System and Service Credentials[18] documentation.\n\nAdded in version 247.\n\nImportCredential=GLOB\nPass one or more credentials to the unit. Takes a credential name for which we'll attempt\nto find a credential that the service manager itself received under the specified name —\nwhich may be used to propagate credentials from an invoking environment (e.g. a container\nmanager that invoked the service manager) into a service. If the credential name is a\nglob, all credentials matching the glob are passed to the unit. Matching credentials are\nsearched for in the system credentials, the encrypted system credentials, and under\n/etc/credstore/, /run/credstore/, /usr/lib/credstore/, /run/credstore.encrypted/,\n/etc/credstore.encrypted/, and /usr/lib/credstore.encrypted/ in that order. When multiple\ncredentials of the same name are found, the first one found is used.\n\nThe globbing expression implements a restrictive subset of glob(7): only a single\ntrailing \"*\" wildcard may be specified. Both \"?\"  and \"[]\" wildcards are not permitted,\nnor are \"*\" wildcards anywhere except at the end of the glob expression.\n\nWhen multiple credentials of the same name are found, credentials found by\nLoadCredential= and LoadCredentialEncrypted= take priority over credentials found by\nImportCredential=.\n\nAdded in version 254.\n\nSetCredential=ID:VALUE, SetCredentialEncrypted=ID:VALUE\nThe SetCredential= setting is similar to LoadCredential= but accepts a literal value to\nuse as data for the credential, instead of a file system path to read the data from. Do\nnot use this option for data that is supposed to be secret, as it is accessible to\nunprivileged processes via IPC. It's only safe to use this for user IDs, public key\nmaterial and similar non-sensitive data. For everything else use LoadCredential=. In\norder to embed binary data into the credential data use C-style escaping (i.e.  \"\\n\" to\nembed a newline, or \"\\x00\" to embed a NUL byte).\n\nThe SetCredentialEncrypted= setting is identical to SetCredential= but expects an\nencrypted credential in literal form as value. This allows embedding confidential\ncredentials securely directly in unit files. Use systemd-creds(1)' -p switch to generate\nsuitable SetCredentialEncrypted= lines directly from plaintext credentials. For further\ndetails see LoadCredentialEncrypted= above.\n\nWhen multiple credentials of the same name are found, credentials found by\nLoadCredential=, LoadCredentialEncrypted= and ImportCredential= take priority over\ncredentials found by SetCredential=. As such, SetCredential= will act as default if no\ncredentials are found by any of the former. In this case not being able to retrieve the\ncredential from the path specified in LoadCredential= or LoadCredentialEncrypted= is not\nconsidered fatal.\n\nAdded in version 247.\n",
            "subsections": []
        },
        "SYSTEM V COMPATIBILITY": {
            "content": "UtmpIdentifier=\nTakes a four character identifier string for an utmp(5) and wtmp entry for this service.\nThis should only be set for services such as getty implementations (such as agetty(8))\nwhere utmp/wtmp entries must be created and cleared before and after execution, or for\nservices that shall be executed as if they were run by a getty process (see below). If\nthe configured string is longer than four characters, it is truncated and the terminal\nfour characters are used. This setting interprets %I style string replacements. This\nsetting is unset by default, i.e. no utmp/wtmp entries are created or cleaned up for this\nservice.\n\nUtmpMode=\nTakes one of \"init\", \"login\" or \"user\". If UtmpIdentifier= is set, controls which type of\nutmp(5)/wtmp entries for this service are generated. This setting has no effect unless\nUtmpIdentifier= is set too. If \"init\" is set, only an INITPROCESS entry is generated and\nthe invoked process must implement a getty-compatible utmp/wtmp logic. If \"login\" is set,\nfirst an INITPROCESS entry, followed by a LOGINPROCESS entry is generated. In this\ncase, the invoked process must implement a login(1)-compatible utmp/wtmp logic. If \"user\"\nis set, first an INITPROCESS entry, then a LOGINPROCESS entry and finally a\nUSERPROCESS entry is generated. In this case, the invoked process may be any process\nthat is suitable to be run as session leader. Defaults to \"init\".\n\nAdded in version 225.\n",
            "subsections": []
        },
        "ENVIRONMENT VARIABLES IN SPAWNED PROCESSES": {
            "content": "Processes started by the service manager are executed with an environment variable block\nassembled from multiple sources. Processes started by the system service manager generally do\nnot inherit environment variables set for the service manager itself (but this may be altered\nvia PassEnvironment=), but processes started by the user service manager instances generally\ndo inherit all environment variables set for the service manager itself.\n\nFor each invoked process the list of environment variables set is compiled from the following\nsources:\n\n•   Variables globally configured for the service manager, using the DefaultEnvironment=\nsetting in systemd-system.conf(5), the kernel command line option systemd.setenv=\nunderstood by systemd(1), or via systemctl(1) set-environment verb.\n\n•   Variables defined by the service manager itself (see the list below).\n\n•   Variables set in the service manager's own environment variable block (subject to\nPassEnvironment= for the system service manager).\n\n•   Variables set via Environment= in the unit file.\n\n•   Variables read from files specified via EnvironmentFile= in the unit file.\n\n•   Variables set by any PAM modules in case PAMName= is in effect, cf. pamenv(8).\n\nIf the same environment variable is set by multiple of these sources, the later source —\naccording to the order of the list above — wins. Note that as the final step all variables\nlisted in UnsetEnvironment= are removed from the compiled environment variable list,\nimmediately before it is passed to the executed process.\n\nThe general philosophy is to expose a small curated list of environment variables to\nprocesses. Services started by the system manager (PID 1) will be started, without additional\nservice-specific configuration, with just a few environment variables. The user manager\ninherits environment variables as any other system service, but in addition may receive\nadditional environment variables from PAM, and, typically, additional imported variables when\nthe user starts a graphical session. It is recommended to keep the environment blocks in both\nthe system and user managers lean. Importing all variables inherited by the graphical session\nor by one of the user shells is strongly discouraged.\n\nHint: systemd-run -P env and systemd-run --user -P env print the effective system and user\nservice environment blocks.\n",
            "subsections": [
                {
                    "name": "Environment Variables Set or Propagated by the Service Manager",
                    "content": "The following environment variables are propagated by the service manager or generated\ninternally for each invoked process:\n\n$PATH\nColon-separated list of directories to use when launching executables.  systemd uses a\nfixed value of \"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin\" in the system manager.\nIn case of the user manager, a different path may be configured by the distribution. It\nis recommended to not rely on the order of entries, and have only one program with a\ngiven name in $PATH.\n\nAdded in version 208.\n\n$LANG\nLocale. Can be set in locale.conf(5) or on the kernel command line (see systemd(1) and\nkernel-command-line(7)).\n\nAdded in version 208.\n\n$USER, $LOGNAME, $HOME, $SHELL\nUser name (twice), home directory, and the login shell.  $USER is set unconditionally,\nwhile $HOME, $LOGNAME, and $SHELL are only set for the units that have User= set and\nSetLoginEnvironment= unset or set to true. For user services, these variables are\ntypically inherited from the user manager itself. See passwd(5).\n\nAdded in version 208.\n\n$INVOCATIONID\nContains a randomized, unique 128-bit ID identifying each runtime cycle of the unit,\nformatted as 32 character hexadecimal string. A new ID is assigned each time the unit\nchanges from an inactive state into an activating or active state, and may be used to\nidentify this specific runtime cycle, in particular in data stored offline, such as the\njournal. The same ID is passed to all processes run as part of the unit.\n\nAdded in version 232.\n\n$XDGRUNTIMEDIR\nThe directory to use for runtime objects (such as IPC objects) and volatile state. Set\nfor all services run by the user systemd instance, as well as any system services that\nuse PAMName= with a PAM stack that includes pamsystemd. See below and pamsystemd(8) for\nmore information.\n\nAdded in version 208.\n\n$RUNTIMEDIRECTORY, $STATEDIRECTORY, $CACHEDIRECTORY, $LOGSDIRECTORY,\n$CONFIGURATIONDIRECTORY\nAbsolute paths to the directories defined with RuntimeDirectory=, StateDirectory=,\nCacheDirectory=, LogsDirectory=, and ConfigurationDirectory= when those settings are\nused.\n\nAdded in version 244.\n\n$CREDENTIALSDIRECTORY\nAn absolute path to the per-unit directory with credentials configured via\nImportCredential=/LoadCredential=/SetCredential=. The directory is marked read-only and\nis placed in unswappable memory (if supported and permitted), and is only accessible to\nthe UID associated with the unit via User= or DynamicUser= (and the superuser).\n\nAdded in version 247.\n\n$MAINPID\nThe PID of the unit's main process if it is known. This is only set for control processes\nas invoked by ExecReload= and similar.\n\nAdded in version 209.\n\n$MANAGERPID\nThe PID of the user systemd instance, set for processes spawned by it.\n\nAdded in version 208.\n\n$LISTENFDS, $LISTENPID, $LISTENFDNAMES\nInformation about file descriptors passed to a service for socket activation. See\nsdlistenfds(3).\n\nAdded in version 208.\n\n$NOTIFYSOCKET\nThe socket sdnotify() talks to. See sdnotify(3).\n\nAdded in version 229.\n\n$WATCHDOGPID, $WATCHDOGUSEC\nInformation about watchdog keep-alive notifications. See sdwatchdogenabled(3).\n\nAdded in version 229.\n\n$SYSTEMDEXECPID\nThe PID of the unit process (e.g. process invoked by ExecStart=). The child process can\nuse this information to determine whether the process is directly invoked by the service\nmanager or indirectly as a child of another process by comparing this value with the\ncurrent PID (similarly to the scheme used in sdlistenfds(3) with $LISTENPID and\n$LISTENFDS).\n\nAdded in version 248.\n\n$TERM\nTerminal type, set only for units connected to a terminal (StandardInput=tty,\nStandardOutput=tty, or StandardError=tty). See termcap(5).\n\nAdded in version 209.\n\n$LOGNAMESPACE\nContains the name of the selected logging namespace when the LogNamespace= service\nsetting is used.\n\nAdded in version 246.\n\n$JOURNALSTREAM\nIf the standard output or standard error output of the executed processes are connected\nto the journal (for example, by setting StandardError=journal) $JOURNALSTREAM contains\nthe device and inode numbers of the connection file descriptor, formatted in decimal,\nseparated by a colon (\":\"). This permits invoked processes to safely detect whether their\nstandard output or standard error output are connected to the journal. The device and\ninode numbers of the file descriptors should be compared with the values set in the\nenvironment variable to determine whether the process output is still connected to the\njournal. Note that it is generally not sufficient to only check whether $JOURNALSTREAM\nis set at all as services might invoke external processes replacing their standard output\nor standard error output, without unsetting the environment variable.\n\nIf both standard output and standard error of the executed processes are connected to the\njournal via a stream socket, this environment variable will contain information about the\nstandard error stream, as that's usually the preferred destination for log data. (Note\nthat typically the same stream is used for both standard output and standard error, hence\nvery likely the environment variable contains device and inode information matching both\nstream file descriptors.)\n\nThis environment variable is primarily useful to allow services to optionally upgrade\ntheir used log protocol to the native journal protocol (using sdjournalprint(3) and\nother functions) if their standard output or standard error output is connected to the\njournal anyway, thus enabling delivery of structured metadata along with logged messages.\n\nAdded in version 231.\n\n$SERVICERESULT\nOnly used for the service unit type. This environment variable is passed to all ExecStop=\nand ExecStopPost= processes, and encodes the service \"result\". Currently, the following\nvalues are defined:\n\nTable 5. Defined $SERVICERESULT values\n┌───────────────────┬───────────────────────────────────┐\n│ Value             │ Meaning                           │\n├───────────────────┼───────────────────────────────────┤\n│ \"success\"         │ The service ran successfully and  │\n│                   │ exited cleanly.                   │\n├───────────────────┼───────────────────────────────────┤\n│ \"protocol\"        │ A protocol violation occurred:    │\n│                   │ the service did not take the      │\n│                   │ steps required by its unit        │\n│                   │ configuration (specifically what  │\n│                   │ is configured in its Type=        │\n│                   │ setting).                         │\n├───────────────────┼───────────────────────────────────┤\n│ \"timeout\"         │ One of the steps timed out.       │\n├───────────────────┼───────────────────────────────────┤\n│ \"exit-code\"       │ Service process exited with a     │\n│                   │ non-zero exit code; see           │\n│                   │ $EXITCODE below for the actual   │\n│                   │ exit code returned.               │\n├───────────────────┼───────────────────────────────────┤\n│ \"signal\"          │ A service process was terminated  │\n│                   │ abnormally by a signal, without   │\n│                   │ dumping core. See $EXITCODE      │\n│                   │ below for the actual signal       │\n│                   │ causing the termination.          │\n├───────────────────┼───────────────────────────────────┤\n│ \"core-dump\"       │ A service process terminated      │\n│                   │ abnormally with a signal and      │\n│                   │ dumped core. See $EXITCODE below │\n│                   │ for the signal causing the        │\n│                   │ termination.                      │\n├───────────────────┼───────────────────────────────────┤\n│ \"watchdog\"        │ Watchdog keep-alive ping was      │\n│                   │ enabled for the service, but the  │\n│                   │ deadline was missed.              │\n├───────────────────┼───────────────────────────────────┤\n│ \"exec-condition\"  │ Service did not run because       │\n│                   │ ExecCondition= failed.            │\n├───────────────────┼───────────────────────────────────┤\n│ \"oom-kill\"        │ A service process was terminated  │\n│                   │ by the Out-Of-Memory (OOM)        │\n│                   │ killer.                           │\n├───────────────────┼───────────────────────────────────┤\n│ \"start-limit-hit\" │ A start limit was defined for the │\n│                   │ unit and it was hit, causing the  │\n│                   │ unit to fail to start. See        │\n│                   │ systemd.unit(5)'s                 │\n│                   │ StartLimitIntervalSec= and        │\n│                   │ StartLimitBurst= for details.     │\n├───────────────────┼───────────────────────────────────┤\n│ \"resources\"       │ A catch-all condition in case a   │\n│                   │ system operation failed.          │\n└───────────────────┴───────────────────────────────────┘\n\nThis environment variable is useful to monitor failure or successful termination of a\nservice. Even though this variable is available in both ExecStop= and ExecStopPost=, it\nis usually a better choice to place monitoring tools in the latter, as the former is only\ninvoked for services that managed to start up correctly, and the latter covers both\nservices that failed during their start-up and those which failed during their runtime.\n\nAdded in version 232.\n\n$EXITCODE, $EXITSTATUS\nOnly defined for the service unit type. These environment variables are passed to all\nExecStop=, ExecStopPost= processes and contain exit status/code information of the main\nprocess of the service. For the precise definition of the exit code and status, see\nwait(2).  $EXITCODE is one of \"exited\", \"killed\", \"dumped\".  $EXITSTATUS contains the\nnumeric exit code formatted as string if $EXITCODE is \"exited\", and the signal name in\nall other cases. Note that these environment variables are only set if the service\nmanager succeeded to start and identify the main process of the service.\n\nTable 6. Summary of possible service result variable values\n┌───────────────────────┬──────────────────────┬──────────────────────────────┐\n│ $SERVICERESULT       │ $EXITCODE           │$EXITSTATUS                  │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"success\"             │ \"killed\"             │\"HUP\", \"INT\", \"TERM\",         │\n│                       │                      │\"PIPE\"                        │\n│                       ├──────────────────────┼──────────────────────────────┤\n│                       │ \"exited\"             │\"0\"                           │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"protocol\"            │ not set              │not set                       │\n│                       ├──────────────────────┼──────────────────────────────┤\n│                       │ \"exited\"             │\"0\"                           │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"timeout\"             │ \"killed\"             │\"TERM\", \"KILL\"                │\n│                       ├──────────────────────┼──────────────────────────────┤\n│                       │ \"exited\"             │\"0\", \"1\", \"2\", \"3\", ...,      │\n│                       │                      │\"255\"                         │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"exit-code\"           │ \"exited\"             │\"1\", \"2\", \"3\", ..., \"255\"     │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"signal\"              │ \"killed\"             │\"HUP\", \"INT\", \"KILL\", ...     │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"core-dump\"           │ \"dumped\"             │\"ABRT\", \"SEGV\", \"QUIT\",       │\n│                       │                      │...                           │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"watchdog\"            │ \"dumped\"             │\"ABRT\"                        │\n│                       ├──────────────────────┼──────────────────────────────┤\n│                       │ \"killed\"             │\"TERM\", \"KILL\"                │\n│                       ├──────────────────────┼──────────────────────────────┤\n│                       │ \"exited\"             │\"0\", \"1\", \"2\", \"3\", ...,      │\n│                       │                      │\"255\"                         │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"exec-condition\"      │ \"exited\"             │\"1\", \"2\", \"3\", \"4\", ...,      │\n│                       │                      │\"254\"                         │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"oom-kill\"            │ \"killed\"             │\"TERM\", \"KILL\"                │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"start-limit-hit\"     │ not set              │not set                       │\n├───────────────────────┼──────────────────────┼──────────────────────────────┤\n│ \"resources\"           │ any of the above     │any of the above              │\n├───────────────────────┴──────────────────────┴──────────────────────────────┤\n│ Note: the process may be also terminated by a signal not sent by systemd.   │\n│ In particular the process may send an arbitrary signal to itself in a       │\n│ handler for any of the non-maskable signals. Nevertheless, in the \"timeout\" │\n│ and \"watchdog\" rows above only the signals that systemd sends have been     │\n│ included. Moreover, using SuccessExitStatus= additional exit statuses may   │\n│ be declared to indicate clean termination, which is not reflected by this   │\n│ table.                                                                      │\n└─────────────────────────────────────────────────────────────────────────────┘\n\nAdded in version 232.\n\n$MONITORSERVICERESULT, $MONITOREXITCODE, $MONITOREXITSTATUS, $MONITORINVOCATIONID,\n$MONITORUNIT\nOnly defined for the service unit type. Those environment variables are passed to all\nExecStart= and ExecStartPre= processes which run in services triggered by OnFailure= or\nOnSuccess= dependencies.\n\nVariables $MONITORSERVICERESULT, $MONITOREXITCODE and $MONITOREXITSTATUS take the\nsame values as for ExecStop= and ExecStopPost= processes. Variables\n$MONITORINVOCATIONID and $MONITORUNIT are set to the invocation id and unit name of\nthe service which triggered the dependency.\n\nNote that when multiple services trigger the same unit, those variables will be not be\npassed. Consider using a template handler unit for that case instead:\n\"OnFailure=handler@%n.service\" for non-templated units, or\n\"OnFailure=handler@%p-%i.service\" for templated units.\n\nAdded in version 251.\n\n$PIDFILE\nThe path to the configured PID file, in case the process is forked off on behalf of a\nservice that uses the PIDFile= setting, see systemd.service(5) for details. Service code\nmay use this environment variable to automatically generate a PID file at the location\nconfigured in the unit file. This field is set to an absolute path in the file system.\n\nAdded in version 242.\n\n$REMOTEADDR, $REMOTEPORT\nIf this is a unit started via per-connection socket activation (i.e. via a socket unit\nwith Accept=yes), these environment variables contain the IP address and port number of\nthe remote peer of the socket connection.\n\nAdded in version 254.\n\n$TRIGGERUNIT, $TRIGGERPATH, $TRIGGERTIMERREALTIMEUSEC, $TRIGGERTIMERMONOTONICUSEC\nIf the unit was activated dynamically (e.g.: a corresponding path unit or timer unit),\nthe unit that triggered it and other type-dependent information will be passed via these\nvariables. Note that this information is provided in a best-effort way. For example,\nmultiple triggers happening one after another will be coalesced and only one will be\nreported, with no guarantee as to which one it will be. Because of this, in most cases\nthis variable will be primarily informational, i.e. useful for debugging purposes, is\nlossy, and should not be relied upon to propagate a comprehensive reason for activation.\n\nAdded in version 252.\n\n$MEMORYPRESSUREWATCH, $MEMORYPRESSUREWRITE\nIf memory pressure monitoring is enabled for this service unit, the path to watch and the\ndata to write into it. See Memory Pressure Handling[19] for details about these variables\nand the service protocol data they convey.\n\nAdded in version 254.\n\n$FDSTORE\nThe maximum number of file descriptors that may be stored in the manager for the service.\nThis variable is set when the file descriptor store is enabled for the service, i.e.\nFileDescriptorStoreMax= is set to a non-zero value (see systemd.service(5) for details).\nApplications may check this environment variable before sending file descriptors to the\nservice manager via sdpidnotifywithfds(3).\n\nAdded in version 254.\n\nFor system services, when PAMName= is enabled and pamsystemd is part of the selected PAM\nstack, additional environment variables defined by systemd may be set for services.\nSpecifically, these are $XDGSEAT, $XDGVTNR, see pamsystemd(8) for details.\n"
                }
            ]
        },
        "PROCESS EXIT CODES": {
            "content": "When invoking a unit process the service manager possibly fails to apply the execution\nparameters configured with the settings above. In that case the already created service\nprocess will exit with a non-zero exit code before the configured command line is executed.\n(Or in other words, the child process possibly exits with these error codes, after having\nbeen created by the fork(2) system call, but before the matching execve(2) system call is\ncalled.) Specifically, exit codes defined by the C library, by the LSB specification and by\nthe systemd service manager itself are used.\n\nThe following basic service exit codes are defined by the C library.\n",
            "subsections": [
                {
                    "name": "Table 7. Basic C library exit codes",
                    "content": "┌───────────┬───────────────┬───────────────────────┐\n│ Exit Code │ Symbolic Name │ Description           │\n├───────────┼───────────────┼───────────────────────┤\n│ 0         │ EXITSUCCESS  │ Generic success code. │\n├───────────┼───────────────┼───────────────────────┤\n│ 1         │ EXITFAILURE  │ Generic failure or    │\n│           │               │ unspecified error.    │\n└───────────┴───────────────┴───────────────────────┘\n\n\nThe following service exit codes are defined by the LSB specification[20].\n"
                },
                {
                    "name": "Table 8. LSB service exit codes",
                    "content": "┌───────────┬──────────────────────┬───────────────────────────┐\n│ Exit Code │ Symbolic Name        │ Description               │\n├───────────┼──────────────────────┼───────────────────────────┤\n│ 2         │ EXITINVALIDARGUMENT │ Invalid or excess         │\n│           │                      │ arguments.                │\n├───────────┼──────────────────────┼───────────────────────────┤\n│ 3         │ EXITNOTIMPLEMENTED  │ Unimplemented feature.    │\n├───────────┼──────────────────────┼───────────────────────────┤\n│ 4         │ EXITNOPERMISSION    │ The user has insufficient │\n│           │                      │ privileges.               │\n├───────────┼──────────────────────┼───────────────────────────┤\n│ 5         │ EXITNOTINSTALLED    │ The program is not        │\n│           │                      │ installed.                │\n├───────────┼──────────────────────┼───────────────────────────┤\n│ 6         │ EXITNOTCONFIGURED   │ The program is not        │\n│           │                      │ configured.               │\n├───────────┼──────────────────────┼───────────────────────────┤\n│ 7         │ EXITNOTRUNNING      │ The program is not        │\n│           │                      │ running.                  │\n└───────────┴──────────────────────┴───────────────────────────┘\n\n\nThe LSB specification suggests that error codes 200 and above are reserved for\nimplementations. Some of them are used by the service manager to indicate problems during\nprocess invocation:\n"
                },
                {
                    "name": "Table 9. systemd-specific exit codes",
                    "content": "┌───────────┬──────────────────────────────┬─────────────────────────────────────────────┐\n│ Exit Code │ Symbolic Name                │ Description                                 │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 200       │ EXITCHDIR                   │ Changing to the requested                   │\n│           │                              │ working directory failed.                   │\n│           │                              │ See WorkingDirectory=                       │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 201       │ EXITNICE                    │ Failed to set up process                    │\n│           │                              │ scheduling priority (nice                   │\n│           │                              │ level). See Nice= above.                    │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 202       │ EXITFDS                     │ Failed to close unwanted                    │\n│           │                              │ file descriptors, or to                     │\n│           │                              │ adjust passed file                          │\n│           │                              │ descriptors.                                │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 203       │ EXITEXEC                    │ The actual process                          │\n│           │                              │ execution failed                            │\n│           │                              │ (specifically, the                          │\n│           │                              │ execve(2) system call).                     │\n│           │                              │ Most likely this is                         │\n│           │                              │ caused by a missing or                      │\n│           │                              │ non-accessible executable                   │\n│           │                              │ file.                                       │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 204       │ EXITMEMORY                  │ Failed to perform an                        │\n│           │                              │ action due to memory                        │\n│           │                              │ shortage.                                   │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 205       │ EXITLIMITS                  │ Failed to adjust resource                   │\n│           │                              │ limits. See LimitCPU= and                   │\n│           │                              │ related settings above.                     │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 206       │ EXITOOMADJUST              │ Failed to adjust the OOM                    │\n│           │                              │ setting. See                                │\n│           │                              │ OOMScoreAdjust= above.                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 207       │ EXITSIGNALMASK             │ Failed to set process                       │\n│           │                              │ signal mask.                                │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 208       │ EXITSTDIN                   │ Failed to set up standard                   │\n│           │                              │ input. See StandardInput=                   │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 209       │ EXITSTDOUT                  │ Failed to set up standard                   │\n│           │                              │ output. See                                 │\n│           │                              │ StandardOutput= above.                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 210       │ EXITCHROOT                  │ Failed to change root                       │\n│           │                              │ directory (chroot(2)).                      │\n│           │                              │ See                                         │\n│           │                              │ RootDirectory=/RootImage=                   │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 211       │ EXITIOPRIO                  │ Failed to set up IO                         │\n│           │                              │ scheduling priority. See                    │\n│           │                              │ IOSchedulingClass=/IOSchedulingPriority=    │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 212       │ EXITTIMERSLACK              │ Failed to set up timer slack. See           │\n│           │                              │ TimerSlackNSec= above.                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 213       │ EXITSECUREBITS              │ Failed to set process secure bits. See      │\n│           │                              │ SecureBits= above.                          │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 214       │ EXITSETSCHEDULER            │ Failed to set up CPU scheduling. See        │\n│           │                              │ CPUSchedulingPolicy=/CPUSchedulingPriority= │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 215       │ EXITCPUAFFINITY             │ Failed to set up CPU affinity. See          │\n│           │                              │ CPUAffinity= above.                         │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 216       │ EXITGROUP                   │ Failed to determine or change group         │\n│           │                              │ credentials. See                            │\n│           │                              │ Group=/SupplementaryGroups= above.          │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 217       │ EXITUSER                    │ Failed to determine or change user          │\n│           │                              │ credentials, or to set up user namespacing. │\n│           │                              │ See User=/PrivateUsers= above.              │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 218       │ EXITCAPABILITIES            │ Failed to drop capabilities, or apply       │\n│           │                              │ ambient capabilities. See                   │\n│           │                              │ CapabilityBoundingSet=/AmbientCapabilities= │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 219       │ EXITCGROUP                  │ Setting up the service control group        │\n│           │                              │ failed.                                     │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 220       │ EXITSETSID                  │ Failed to create new process session.       │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 221       │ EXITCONFIRM                 │ Execution has been cancelled by the user.   │\n│           │                              │ See the systemd.confirmspawn= kernel       │\n│           │                              │ command line setting on kernel-command-     │\n│           │                              │ line(7) for details.                        │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 222       │ EXITSTDERR                  │ Failed to set up standard error output. See │\n│           │                              │ StandardError= above.                       │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 224       │ EXITPAM                     │ Failed to set up PAM session. See PAMName=  │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 225       │ EXITNETWORK                 │ Failed to set up network namespacing. See   │\n│           │                              │ PrivateNetwork= above.                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 226       │ EXITNAMESPACE               │ Failed to set up mount, UTS, or IPC         │\n│           │                              │ namespacing. See ReadOnlyPaths=,            │\n│           │                              │ ProtectHostname=, PrivateIPC=, and related  │\n│           │                              │ settings above.                             │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 227       │ EXITNONEWPRIVILEGES       │ Failed to disable new privileges. See       │\n│           │                              │ NoNewPrivileges=yes above.                  │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 228       │ EXITSECCOMP                 │ Failed to apply system call filters. See    │\n│           │                              │ SystemCallFilter= and related settings      │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 229       │ EXITSELINUXCONTEXT         │ Determining or changing SELinux context     │\n│           │                              │ failed. See SELinuxContext= above.          │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 230       │ EXITPERSONALITY             │ Failed to set up an execution domain        │\n│           │                              │ (personality). See Personality= above.      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 231       │ EXITAPPARMORPROFILE        │ Failed to prepare changing AppArmor         │\n│           │                              │ profile. See AppArmorProfile= above.        │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 232       │ EXITADDRESSFAMILIES        │ Failed to restrict address families. See    │\n│           │                              │ RestrictAddressFamilies= above.             │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 233       │ EXITRUNTIMEDIRECTORY       │ Setting up runtime directory failed. See    │\n│           │                              │ RuntimeDirectory= and related settings      │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 235       │ EXITCHOWN                   │ Failed to adjust socket ownership. Used for │\n│           │                              │ socket units only.                          │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 236       │ EXITSMACKPROCESSLABEL     │ Failed to set SMACK label. See              │\n│           │                              │ SmackProcessLabel= above.                   │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 237       │ EXITKEYRING                 │ Failed to set up kernel keyring.            │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 238       │ EXITSTATEDIRECTORY         │ Failed to set up unit's state directory.    │\n│           │                              │ See StateDirectory= above.                  │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 239       │ EXITCACHEDIRECTORY         │ Failed to set up unit's cache directory.    │\n│           │                              │ See CacheDirectory= above.                  │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 240       │ EXITLOGSDIRECTORY          │ Failed to set up unit's logging directory.  │\n│           │                              │ See LogsDirectory= above.                   │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 241       │ EXITCONFIGURATIONDIRECTORY │ Failed to set up unit's configuration       │\n│           │                              │ directory. See ConfigurationDirectory=      │\n│           │                              │ above.                                      │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 242       │ EXITNUMAPOLICY             │ Failed to set up unit's NUMA memory policy. │\n│           │                              │ See NUMAPolicy= and NUMAMask= above.        │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 243       │ EXITCREDENTIALS             │ Failed to set up unit's credentials. See    │\n│           │                              │ ImportCredential=, LoadCredential= and      │\n│           │                              │ SetCredential= above.                       │\n├───────────┼──────────────────────────────┼─────────────────────────────────────────────┤\n│ 245       │ EXITBPF                     │ Failed to apply BPF restrictions. See       │\n│           │                              │ RestrictFileSystems= above.                 │\n└───────────┴──────────────────────────────┴─────────────────────────────────────────────┘\n\n\nFinally, the BSD operating systems define a set of exit codes, typically defined on Linux\nsystems too:\n"
                },
                {
                    "name": "Table 10. BSD exit codes",
                    "content": "┌───────────┬────────────────┬───────────────────────────┐\n│ Exit Code │ Symbolic Name  │ Description               │\n├───────────┼────────────────┼───────────────────────────┤\n│ 64        │ EXUSAGE       │ Command line usage error  │\n├───────────┼────────────────┼───────────────────────────┤\n│ 65        │ EXDATAERR     │ Data format error         │\n├───────────┼────────────────┼───────────────────────────┤\n│ 66        │ EXNOINPUT     │ Cannot open input         │\n├───────────┼────────────────┼───────────────────────────┤\n│ 67        │ EXNOUSER      │ Addressee unknown         │\n├───────────┼────────────────┼───────────────────────────┤\n│ 68        │ EXNOHOST      │ Host name unknown         │\n├───────────┼────────────────┼───────────────────────────┤\n│ 69        │ EXUNAVAILABLE │ Service unavailable       │\n├───────────┼────────────────┼───────────────────────────┤\n│ 70        │ EXSOFTWARE    │ internal software error   │\n├───────────┼────────────────┼───────────────────────────┤\n│ 71        │ EXOSERR       │ System error (e.g., can't │\n│           │                │ fork)                     │\n├───────────┼────────────────┼───────────────────────────┤\n│ 72        │ EXOSFILE      │ Critical OS file missing  │\n├───────────┼────────────────┼───────────────────────────┤\n│ 73        │ EXCANTCREAT   │ Can't create (user)       │\n│           │                │ output file               │\n├───────────┼────────────────┼───────────────────────────┤\n│ 74        │ EXIOERR       │ Input/output error        │\n├───────────┼────────────────┼───────────────────────────┤\n│ 75        │ EXTEMPFAIL    │ Temporary failure; user   │\n│           │                │ is invited to retry       │\n├───────────┼────────────────┼───────────────────────────┤\n│ 76        │ EXPROTOCOL    │ Remote error in protocol  │\n├───────────┼────────────────┼───────────────────────────┤\n│ 77        │ EXNOPERM      │ Permission denied         │\n├───────────┼────────────────┼───────────────────────────┤\n│ 78        │ EXCONFIG      │ Configuration error       │\n└───────────┴────────────────┴───────────────────────────┘\n\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Example 3. $MONITOR* usage\n\nA service myfailer.service which can trigger an OnFailure= dependency.\n\n[Unit]\nDescription=Service which can trigger an OnFailure= dependency\nOnFailure=myhandler.service\n\n[Service]\nExecStart=/bin/myprogram\n\n\nA service mysuccess.service which can trigger an OnSuccess= dependency.\n\n[Unit]\nDescription=Service which can trigger an OnSuccess= dependency\nOnSuccess=myhandler.service\n\n[Service]\nExecStart=/bin/mysecondprogram\n\n\nA service myhandler.service which can be triggered by any of the above services.\n\n[Unit]\nDescription=Acts on service failing or succeeding\n\n[Service]\nExecStart=/bin/bash -c \"echo $MONITORSERVICERESULT $MONITOREXITCODE $MONITOREXITSTATUS $MONITORINVOCATIONID $MONITORUNIT\"\n\n\nIf myfailer.service were to run and exit in failure, then myhandler.service would be\ntriggered and the monitor variables would be set as follows:\n\nMONITORSERVICERESULT=exit-code\nMONITOREXITCODE=exited\nMONITOREXITSTATUS=1\nMONITORINVOCATIONID=cc8fdc149b2b4ca698d4f259f4054236\nMONITORUNIT=myfailer.service\n\n\nIf mysuccess.service were to run and exit in success, then myhandler.service would be\ntriggered and the monitor variables would be set as follows:\n\nMONITORSERVICERESULT=success\nMONITOREXITCODE=exited\nMONITOREXITSTATUS=0\nMONITORINVOCATIONID=6ab9af147b8c4a3ebe36e7a5f8611697\nMONITORUNIT=mysuccess.service\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), systemctl(1), systemd-analyze(1), journalctl(1), systemd-system.conf(5),\nsystemd.unit(5), systemd.service(5), systemd.socket(5), systemd.swap(5), systemd.mount(5),\nsystemd.kill(5), systemd.resource-control(5), systemd.time(7), systemd.directives(7),\ntmpfiles.d(5), exec(3), fork(2)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Discoverable Partitions Specification\nhttps://uapi-group.org/specifications/specs/discoverablepartitionsspecification\n\n2. The /proc Filesystem\nhttps://docs.kernel.org/filesystems/proc.html#mount-options\n\n3. User/Group Name Syntax\nhttps://systemd.io/USERNAMES\n\n4. No New Privileges Flag\nhttps://docs.kernel.org/userspace-api/nonewprivs.html\n\n5. JSON User Record\nhttps://systemd.io/USERRECORD\n\n6. The /proc Filesystem\nhttps://docs.kernel.org/filesystems/proc.html\n\n7. Kernel Samepage Merging\nhttps://docs.kernel.org/admin-guide/mm/ksm.html\n\n8. unicode scalar values\nhttps://www.unicode.org/glossary/#unicodescalarvalue\n\n9. unicode noncharacters\nhttps://www.unicode.org/glossary/#noncharacter\n\n10. unicode byte order mark\nhttps://www.unicode.org/glossary/#byteordermark\n\n11. POSIX shell unquoted text\nhttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3chap02.html#tag180201\n\n12. POSIX shell single-quoted text\nhttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3chap02.html#tag180202\n\n13. POSIX shell double-quoted text\nhttps://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3chap02.html#tag180203\n\n14. Base64\nhttps://tools.ietf.org/html/rfc2045#section-6.8\n\n15. Container Interface\nhttps://systemd.io/CONTAINERINTERFACE\n\n16. DMI/SMBIOS\nhttps://www.dmtf.org/standards/smbios\n\n17. qemu\nhttps://www.qemu.org/docs/master/system/index.html\n\n18. System and Service Credentials\nhttps://systemd.io/CREDENTIALS\n\n19. Memory Pressure Handling\nhttps://systemd.io/MEMORYPRESSURE\n\n20. LSB specification\nhttps://refspecs.linuxbase.org/LSB5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html\n\nsystemd 255                                                                          SYSTEMD.EXEC(5)",
            "subsections": []
        }
    },
    "summary": "systemd.exec - Execution environment configuration",
    "flags": [],
    "examples": [
        "Example 3. $MONITOR* usage",
        "A service myfailer.service which can trigger an OnFailure= dependency.",
        "[Unit]",
        "Description=Service which can trigger an OnFailure= dependency",
        "OnFailure=myhandler.service",
        "[Service]",
        "ExecStart=/bin/myprogram",
        "A service mysuccess.service which can trigger an OnSuccess= dependency.",
        "[Unit]",
        "Description=Service which can trigger an OnSuccess= dependency",
        "OnSuccess=myhandler.service",
        "[Service]",
        "ExecStart=/bin/mysecondprogram",
        "A service myhandler.service which can be triggered by any of the above services.",
        "[Unit]",
        "Description=Acts on service failing or succeeding",
        "[Service]",
        "ExecStart=/bin/bash -c \"echo $MONITORSERVICERESULT $MONITOREXITCODE $MONITOREXITSTATUS $MONITORINVOCATIONID $MONITORUNIT\"",
        "If myfailer.service were to run and exit in failure, then myhandler.service would be",
        "triggered and the monitor variables would be set as follows:",
        "MONITORSERVICERESULT=exit-code",
        "MONITOREXITCODE=exited",
        "MONITOREXITSTATUS=1",
        "MONITORINVOCATIONID=cc8fdc149b2b4ca698d4f259f4054236",
        "MONITORUNIT=myfailer.service",
        "If mysuccess.service were to run and exit in success, then myhandler.service would be",
        "triggered and the monitor variables would be set as follows:",
        "MONITORSERVICERESULT=success",
        "MONITOREXITCODE=exited",
        "MONITOREXITSTATUS=0",
        "MONITORINVOCATIONID=6ab9af147b8c4a3ebe36e7a5f8611697",
        "MONITORUNIT=mysuccess.service"
    ],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemctl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemctl/1/json"
        },
        {
            "name": "systemd-analyze",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-analyze/1/json"
        },
        {
            "name": "journalctl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/journalctl/1/json"
        },
        {
            "name": "systemd-system.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-system.conf/5/json"
        },
        {
            "name": "systemd.unit",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.unit/5/json"
        },
        {
            "name": "systemd.service",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
        },
        {
            "name": "systemd.socket",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.socket/5/json"
        },
        {
            "name": "systemd.swap",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.swap/5/json"
        },
        {
            "name": "systemd.mount",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.mount/5/json"
        },
        {
            "name": "systemd.kill",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.kill/5/json"
        },
        {
            "name": "systemd.resource-control",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.resource-control/5/json"
        },
        {
            "name": "systemd.time",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.time/7/json"
        },
        {
            "name": "systemd.directives",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.directives/7/json"
        },
        {
            "name": "tmpfiles.d",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/tmpfiles.d/5/json"
        },
        {
            "name": "exec",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/exec/3/json"
        },
        {
            "name": "fork",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/fork/2/json"
        }
    ]
}