Debian OS GUI Disable


#1

Hello,

Is there an easy way to disable the GUI in Debian? I would like to have a command line only system. I have tried to disable the GUI program, but cannot find KDE or Gnome. Am I forced to recompile with the GUI option deselected? Thank you for your time!


#2

on a running system, you can change the ‘default’ target to be console only:

systemctl set-default multi-user.target

More info here: https://wiki.archlinux.org/index.php/systemd (i am sure there is a Debian/Ubuntu wiki too… but i usually refer to this page)


#3

Send “text” arg in the kernel cmdline to boot to console mode.

later to go to gui mode

export DISPLAY=:0.0
startlxde &
xterm &


#4

@vinaysimha: this no longer works actually. Using ‘text’ in bootargs is the old method that worked ~1.5 year ago before we started using systemd in our Debian (or Ubuntu) builds.

You can set the boot target in the bootargs but instead of ‘text’ you need to add ‘systemd.unit=multi-user.target’ instead.

Once the system is started , if you want to start the GUI, you can run:

systemctl isolate graphical.target


#6

Hi ndec and others.

Thanks for the responses. ndec, your solution was simple and works great! Thanks again!