← All tools

systemd tmpfiles.d Entry Builder

Compose one line for a tmpfiles.d file: create a directory or file, correct its ownership, clean old contents, remove a path or link an alternate name. The page shows the exact directive, its file name and the commands that apply it.

the first field of the line
absolute; r and x also accept a glob
three or four octal digits, up to 1777
name or numeric id; blank means root
name or numeric id; blank means root
time span for cleanup, like 30d or 12h
Build an entry to see the tmpfiles.d line.

A tmpfiles.d line is seven space-separated fields: type, path, mode, user, group, age and an argument that only L entries use; a dash leaves a field unset. The type decides what runs: d, e, f, q and L act on systemd-tmpfiles --create, while d, e, q, r and x act on --clean, and age only limits cleanup, never creation. Files are read in lexical order, and a file in /etc/tmpfiles.d overrides the same-named file in /usr/lib/tmpfiles.d. Modes here stop at 1777, so setuid and setgid bits are not offered. This page only composes text: it reads no files, installs nothing and makes no network requests.