How do you disable a service with systemd?

Stephen Dowdy sdowdy at ucar.edu
Fri May 29 00:20:25 CEST 2015


$ROOT_CMD ln -s /dev/null /etc/systemd/system/lightdm.service?
(mask it out in the system override directory)

(not quite same as disabling).

I think minimally, you need to:

$ROOT_CMD /bin/rm -f
/etc/systemd/system/multi-user.target.wants/lightdm.service (or whatever
it's called)

(presuming that's your default systemd target)


--stephen


On Thu, May 28, 2015 at 3:14 PM, Bob Apodaca <bob at phxlab.honeywell.com>
wrote:

> 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?
>



-- 
Stephen Dowdy  -  Systems Administrator  -  NCAR/RAL
303.497.2869   -  sdowdy at ucar.edu        -  http://www.ral.ucar.edu/~sdowdy/
-------------- n�chster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20150528/8d2b7895/attachment.html>


More information about the linux-fai mailing list