How to disable lightdm?

I want to disable lightdm from autostart. Currenty, I run service lightdm disable from terminal, then run startx.

update-rc.d doesnt help


Solution 1:

Note that the method described above doesn't work anymore since 15.04 and later, since Upstart was replaced by Systemd. As described here, one can now disable lightdm like this:

16.04 upward

systemctl disable lightdm.service

15.04, 15.10

systemctl disable lightdm

Solution 2:

lightdm is started by Upstart, not SysV Init. So update-rc.d doesn't work.

Use

 echo  "manual" | sudo tee -a /etc/init/lightdm.override