Toolvito

Systemd Unit Validator

Paste a unit file or choose one or more. Each problem is shown with its line: a setting in the wrong section, a misspelt setting, a value systemd does not accept, a time span or calendar event it cannot read, or a rule of the unit type that is broken. The files are read in your browser and never uploaded.

Check a unit file

    How to check a unit file

    1. Paste the unit file and type its file name (for example shop.service), or choose files.
    2. Press “Check”. Read the problems first, then the warnings and notes.
    3. Press “line N” to select that line in the text box, fix it and check again.

    What is checked

    • The file: [Section] headers, Setting=value lines, comments starting with # or ;, and lines continued with a backslash at the end.
    • Sections and settings: [Unit] and [Install] in every unit, and the section of the unit type ([Service], [Socket], [Timer], [Path], [Mount]) with the settings the systemd manual lists for it, including those of systemd.exec, systemd.kill and systemd.resource-control. A misspelt setting gets a suggestion.
    • Values: yes/no settings (1, yes, true, on, 0, no, false, off), Type=, Restart=, NotifyAccess=, ExitType= and KillMode=, time spans such as 1min 30s, OnCalendar= calendar events (weekdays, dates, times, ranges with .., lists with commas, repetitions with /, ~ for days from the end of the month), Exec commands (prefixes such as - and +, then an absolute path or a plain program name) and unit names.
    • Rules of the unit type: a service needs ExecStart= (unless RemainAfterExit=yes with ExecStop=), only Type=oneshot may have several ExecStart= commands, Restart=always and on-success are not allowed with Type=oneshot; a timer needs a time; a socket needs a Listen setting; a mount needs What= and Where= and must be named after its mount point.

    Limits you should know

    • The page follows the manual of systemd 262; an older systemd may not know newer settings. Settings of [Swap], [Automount] and [Scope] sections are not checked one by one.
    • It does not run systemd-analyze verify, and it does not check that the programs, users and paths named in the file exist on your machine.

    Related tools