DH_SYSTEMD_ENABLE(1)
π dh_systemd_enable β the girlies' guide to systemd unit files π
okay so welcome to DH_SYSTEMD_ENABLE(1), bestie. this is a debhelper program and she's here to enable and disable your systemd unit files. no cap.
β¨ NAME β¨
dh_systemd_enable β enable/disable systemd unit files π
πΈ SYNOPSIS πΈ
dh_systemd_enable [debhelper options] [--no-enable] [--name=name]
[unit file ...]
π¦ DESCRIPTION π¦
so dh_systemd_enable is a debhelper program, and her whole job, her entire main character arc, is being responsible for enabling and disabling systemd unit files. that's it. that's the gig. π
the simple case: she finds all the unit files that got installed by a package (think bacula-fd.service) and she enables them. and like, super important β it is not necessary that the machine actually runs systemd during package installation time. enabling happens on all machines, and the whole point is being able to switch from sysvinit to systemd and back again. so versatile. so iconic. π
the complex case: you can call dh_systemd_enable and dh_systemd_start manually β by overwriting the debian/rules targets β and specify flags per unit file. the classic example is colord, which ships colord.service, a dbus-activated service with no [Install] section. that service file literally cannot be enabled or disabled (a state systemd calls "static") because it has no [Install] section. so running dh_systemd_enable on it? does not make sense, bestie. π
and if you only want to generate blocks for specific service files, you pass them as arguments, like:
dh_systemd_enable quota.service
and:
dh_systemd_enable --name=quotarpc quotarpc.service
see? easy. ate. π₯
π FILES π
these are the files she's looking for, and where they end up (all inside the package build directory) π
debian/package.service,debian/package@.serviceβ if this exists, it gets installed intousr/lib/systemd/system/package.service(orusr/lib/systemd/system/package@.service).debian/package.tmpfileβ if this exists, it gets installed intousr/lib/tmpfiles.d/package.conf.debian/package.target,debian/package@.targetβ if this exists, it gets installed intousr/lib/systemd/system/package.target(orusr/lib/systemd/system/package@.target).debian/package.socket,debian/package@.socketβ if this exists, it gets installed intousr/lib/systemd/system/package.socket(orusr/lib/systemd/system/package@.socket).debian/package.mountβ if this exists, it gets installed intousr/lib/systemd/system/package.mount.debian/package.path,debian/package@.pathβ if this exists, it gets installed intousr/lib/systemd/system/package.path(orusr/lib/systemd/system/package@.path).debian/package.timer,debian/package@.timerβ if this exists, it gets installed intousr/lib/systemd/system/package.timer(orusr/lib/systemd/system/package@.timer).
π OPTIONS π
--no-enableβ disable the service(s) on purge, but do not enable them on install.
heads up bestie: this option does not affect whether the services are started. that's a whole different thing, controlled bydh_systemd_start(1)(using e.g. its--no-startoption). don't get it twisted. π
--name=nameβ install the service file asname.serviceinstead of the default filename, which ispackage.service. when this parameter is used,dh_systemd_enablelooks for and installs files nameddebian/package.name.serviceinstead of the usualdebian/package.service.
β NOTES β
π¨ not me forgetting this one β note that this command is not idempotent. dh_prep(1) should be called between invocations of this command (with the same arguments). otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. messy. we don't do messy. π
also: note that dh_systemd_enable should be run before dh_installinit. the default sequence in dh does the right thing, so this note is only relevant when you are calling dh_systemd_enable manually. okay? okay. π«Ά
π SEE ALSO π
π AUTHORS π
pkg-systemd-maintainers@lists.alioth.debian.org
and that's the whole page, bestie!! this one's from debhelper version 14.5ubuntu1, dated 2026-09-21 β she's serving DH_SYSTEMD_ENABLE(1) energy and honestly? she slayed. go enable some units. periodt. π
β¨π¦
π¦ where this page comes from
- ubuntu stonking: debhelper 14.5ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms