I have installed Debian wheezy on my machine with a netinst image, now I would like to deactivate the desktop and boot straight to the command line, not only that but I would like to not waste any resource on the X11/gnome/gdm at all if not needed.

I tried ( as root )

update-rc.d -f gdm remove
update-rc.d -f gdm3 remove
update-rc.d -f wdm remove

but Debian keeps booting into the login manager, I really don't need that, how I can deactivate this kind of boot and start X only when needed ?

3 Answers 3


Look in /etc/rc2.d/. There are probably links to /etc/init.d/xdm and /etc/init.d/kdm which you haven't removed yet.

You can also edit the file /etc/X11/default-display-manager, which includes the full path to the default display manager Debian is using. If you replace the content of that file with /bin/true, you are probably disabling the start of any login-manager as well.

The TTYs are spawned anyways. If no login-manager is launched, TTY1 will remain the active TTY and you can just log in using the command line.

  • I'm sure i have no xfce or kde-related package installed because I just installed the "default" gnome desktop environment, I will go for /etc/X11/default-display-manager and see if this solves. Aug 14, 2013 at 17:22
  • A quick ls /etc/rc2.d/ would provide proof. I'm sure you have no idea what packages you never wanted have been installed. You're using Debian, not Gentoo. :-)
    – Bananguin
    Aug 14, 2013 at 17:28
  • 1
    I commented out with a # the line inside /etc/X11/default-display-manager and added a new one with /bin/true and now it boots into a tty, or, in better terms, it doesn't boot any display manager, just like I wanted. Debian is my choice at the moment because of the really low requirements and the pre-compiled packages in the repository, I'm running it under an 800Mhz single core CPU with 128Mb of ram, to run Gentoo under this system you will need ages; but Debian is perfectly fine for now. Aug 14, 2013 at 17:40

For Debian 8 with systemctl:

systemctl disable gdm

Actually for those who come across this looking how to disable login screen user list in Jessie the above comment about Debian 8 is incorrect at least as of today. To disable this in Debian 8 Jessie do the following:

$ sudo nano /etc/gdm3/greeter.dconf-defaults

With the file open remove the # in front of the disable-user-list=true line as shown in the file sample below.

# Login manager options

# - Disable user list
# disable-user-list=true
# - Disable restart buttons
# disable-restart-buttons=true
# - Show a login welcome message
# banner-message-enable=true
# banner-message-text='Welcome'    

After changing press 'CTRL+X' then 'Y' and press ENTER to save the changes.

After you save the file run the following command to restart GDM and you will be prompted for your login.

$ sudo systemctl restart gdm3.service

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .