How do you disable a service with systemd?

Bob Apodaca bob at phxlab.honeywell.com
Thu May 28 23:14:28 CEST 2015


I am using Debian Jessie and things are going well, with a couple 
exceptions. I am installing lightdm, but on some systems I want to 
disable it.  I was trying to do:

systemctl disable lightdm

However, systemd knows this is a chroot environment and the command 
fails. I've also tried the following:

$ROOT_CMD rm -f /etc/systemd/system/display-manager.service
$ROOT_CMD /usr/sbin/update-rc.d lightdm defaults
$ROOT_CMD /usr/sbin/update-rc.d lightdm disable

Any suggestions?


More information about the linux-fai mailing list