A systemd-tmpfiles rule has seven fields, in this order: Type Path Mode User Group Age Argument. The type determines the operation and which of the other fields apply; a dash (-) generally means a field is unspecified, not that a value should be erased.
The seven fields, from left to right
The field layout documented in Debian testing’s tmpfiles.d(5) manual is:
Type Path Mode User Group Age Argument
| Field | Meaning | How to interpret it |
|---|---|---|
Type |
The operation | A letter such as d or L, optionally followed by supported modifiers. The type determines which remaining fields matter. |
Path |
The filesystem target | The file or directory to act on; some rule types also accept glob patterns. Do not assume every path is treated as a glob. |
Mode |
Access permissions | An octal mode such as 0755, when relevant to the type. - leaves it unspecified. |
User |
Owner | A user name for types that apply ownership. - leaves it unspecified. |
Group |
Group owner | A group name for types that apply ownership. - leaves it unspecified. |
Age |
Cleanup threshold | Used by applicable rules during cleanup; it is not a timer that applies to every rule. |
Argument |
Additional type-specific data | For example, a symlink destination or content to write. It occupies the seventh field and has special whitespace handling. |
These meanings are not universal instructions to set every value on every line. Consult the installed tmpfiles.d(5) manual for the exact behavior of a type and any modifiers your system supports.
How the fields work in real rules
Directory rule
d /run/user 0755 root root 10d -
d selects directory creation or management, and /run/user is the target. 0755 is the mode; root root specify user and group. 10d is an age value for applicable cleanup behavior, while the final - leaves the argument unused. This is a syntax example from the tmpfiles.d manual, not a claim that the directory is necessarily removed after ten days in every situation.
#1 Best Overall
Symlink rule
L /tmp/foobar - - - - /dev/null
L selects the symlink operation, and /tmp/foobar is the link path. The four dashes leave mode, user, group, and age unspecified; /dev/null is the type-specific argument giving the link destination.
Parsing details that can change how a line reads
- Each rule occupies a line; whitespace separates fields.
- Fields can contain C-style escapes. Fields other than the seventh argument may also be quoted.
- The seventh field is special: after the argument starts, the remaining text belongs to it, including whitespace. To make an argument begin with whitespace, use a C-style escape such as
x20. - A type that does not define an argument rejects a non-empty argument. Use
-where the argument should be empty. - Some types accept glob patterns in the path field; glob behavior is type-dependent.
- Modifier characters can appear with a type, but supported combinations and their effects depend on the systemd version. Check the local manual rather than assuming a modifier behaves identically across distributions.
When tmpfiles rules take effect
The systemd-tmpfiles manual describes the utility as creating, deleting, and cleaning up files and directories using the configuration format and locations defined by tmpfiles.d(5). Invocations such as --create, --remove, and --clean select operation sets. Cleanup is concerned with entries that have applicable age parameters; an age value does not make every rule a scheduled deletion.
System services process system configuration. User services read separate user configuration locations and do not control global cleanup for the system instance.
Quick Recap
Best Value
Rank #4
How to read or compare two rules safely
- Read the type first to identify the operation and determine which fields apply.
- Check the path to see exactly which target—or, where supported, which matching paths—is affected.
- Interpret mode, user, and group as metadata settings only where that operation uses them; treat dashes as unspecified fields.
- Read age as a cleanup parameter only for applicable types.
- Interpret the final argument according to the type, keeping its special whitespace parsing in mind.
- For a rule on a particular machine, consult
man tmpfiles.dand checksystemd-tmpfiles --version. Distribution manuals can describe a different systemd version from the one installed on the host.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →




