Sections

  • About Author
  • Contact
  • Debian Hosting
  • Popular Posts
  • Privacy Policy
  • Sitemap

Debian Admin

Debian/Ubuntu Linux System Administration Tutorials,Howtos,Tips

Categories

  • Backup
  • Database
  • Free-Tools
  • General
  • Monitoring
  • Network
  • Other Linux
  • Package-Mgmt
  • Paloalto Firewalls
  • Security
  • Webserver

Howto Boot debian in text mode instead of graphical mode (GUI)

Posted on August 29, 2007 by ruchi 27 Comments

This is very useful tip for all debian users

You can prevent automatic running of the GUI when you boot your debian machine by disabling your login manager be it KDM, GDM or XDM from running at boot time. To disable the login manager from automatically running at boot up, run the following command as root

#update-rc.d -f gdm remove

Replace gdm with kdm or xdm if they are what you use.

To start X manually, you would then have to login at the command prompt and enter the command startx.

To reset your login manager so that it runs at boot up, do

#update-rc.d -f gdm defaults

Related content:

  1. How to disable X or GUI on boot in Debian
  2. Fix for sleepy display and boot-to-prompt on iMac G3
  3. Install KDE Desktop in Debian Etch
  4. Remove Unwanted Startup Files or Services
  5. How to install ATI fglrx driver in debian

Categories: General

Tags: boot-debian-in-text-mode, disable-login-manager-debian, how-to-boot-debian-in-text-mode

27 thoughts on “Howto Boot debian in text mode instead of graphical mode (GUI)”

  1. Mathias Bernhardt on August 29, 2007 at 8:26 pm said:

    Hi!

    I usualy boot into text-Mode. I also have this line in my .bash_profile:

    if [ “$(echo $(who am i)|awk ‘{print $2}’)” = “tty1” ]; then startx;logout;fi

    So when i login at the first Terminal then the windowmanager is started via .xinitrc. I like this much more than all the gdm/kdm/xdm stuff because it uses only MY configs and not those of any admin and the x server is started by the user who’s actually using it.

  2. Sam Morris on September 9, 2007 at 1:47 pm said:

    I believe this will result in the login manager being enabled again the next time it is upgraded. update-rc.d is *not* for administrators to use — it is only for package maintainer scripts to use to install their startup links.

    The correct way to disable a service (such as GDM) from being started in a given runlevel (e.g., 2 which is Debian’s default runlevel) is like so:

    mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm

    Further information can be found in /etc/rc2.d/README.

  3. Guti on September 9, 2007 at 6:59 pm said:

    Very nice article.

  4. mzilikazi on September 10, 2007 at 12:55 pm said:

    There is a nifty tool called rcconf that can manage run level symlinks for you. Using this tool it is not required to enter each rc*.d dir and manually rename a symlink. It speeds things up a bit.

  5. Ken on September 10, 2007 at 2:45 pm said:

    Autologin:
    you will want to apt-get remove gdm, kdm, xdm, wdm
    and apt-get install rungetty afterwards open /etc/inittab and modify this line 1:2345:respawn:/sbin/getty 38400 tty1 to
    1:2345:respawn:/sbin/rungetty tty1 –autologin $user

    Now edit and to your /home/$user/.bash_profile

    if [ -z “$DISPLAY” ] && [ $(tty) == /dev/tty1 ]; then
    while [ 1 == 1 ]
    do
    startx
    sleep 10
    done
    fi

  6. Delian Krustev on September 10, 2007 at 5:17 pm said:

    Reading a headline like this could made someone believe debian is more user friendly than ubuntu .. I think it is more appropriate to set the title to:

    How stupid should I be to make a machine start directly in X .. especially in debian ?

    “The correct way to disable a service (such as GDM) from being started in a given runlevel (e.g., 2 which is Debian’s default runlevel) is like so:

    mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm

    Further information can be found in /etc/rc2.d/README.”

    Is it ? May be you should consult the manual page of update-rc.d ..

    $ ls /etc | grep “^rc”
    rc.local
    $

    How about /etc/rc2.d not existing at all ?

    sysv-rc sucks the big time ..
    If you want the states to be preserved you should replace sysv-rc with file-rc . Something everyone should do.

    Just my 2 BOFH cents ..

  7. acohen36 on September 24, 2007 at 5:00 pm said:

    mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm

    Yep, Sam Morris’s su easy edit works like a charm every time.
    Also goes great together with the other ?dm’s kdm and xdm 🙂

  8. valsj on October 24, 2008 at 12:08 pm said:

    nice. very helpful

  9. Stan on September 7, 2009 at 6:35 pm said:

    Why not just:
    apt-get remove gdm
    ???

    Then it is gone for good!

  10. Ayekat on January 12, 2010 at 8:10 pm said:

    Why not just:
    apt-get remove gdm
    ???

    Then it is gone for good!

    Sorry, I’m probably just some newbie speaking bad english, but everytime I remove Gnome, GDM or even just Epiphany, Debian tells me that a huuuuuuuuge amount of programs aren’t needed anymore.

    And then, if I type apt-get autoremove, Debian starts removing every GUI component of the system.

  11. Wolf on January 28, 2010 at 11:43 am said:

    Hi All, but really I’m confised reading all that post on this thread, was looking to only remove permanently the gui start-up from my Debian and get a lot of misleading information. Even after trying undate-rc.d gdm remove I get the following output: update-rc.d: /etc/init.d/gdm exist during rc.d purge (use -f to force)

    So what’s that?
    Sure I have to reboot to see what happen after my first attempt to get gui startup out.
    Maybe after someone will give a short and clear statement to this post, other can really get usefully info.

    Thanks

  12. Marco on February 9, 2010 at 5:28 pm said:

    I tried to run “update-rc.d -f gdm remove” as root but didn’t have any effect, on a fresh installation of Ubuntu 9.10 64 bit: the computer still boot in graphical mode.

  13. CrazyA on February 18, 2010 at 4:59 pm said:

    Marco: I had exactly the same thing. For now, I’ll just deal with it and leave it eating up resources while it shouldn’t…

  14. Marco on February 19, 2010 at 2:10 pm said:

    CrazyA, I solved it.

    You need to open the /etc/default/grub file, locate the following line:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

    and change it to:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

    and don’t forget to run ‘update-grub’ afterwards to update.

  15. CrazyA on February 22, 2010 at 5:16 pm said:

    Marco: Thank you very much. I finaly got back home so I could try it, and it works like a charm!

  16. Matt on June 6, 2010 at 2:42 am said:

    I had the same trouble as you marco. I’ve removed gdm like it’s said here but at reboot … still gnome launched -.-
    thank you marco for the solution 🙂

    this topic should be updated by admin ^^

  17. Dave Oliphant on September 9, 2010 at 10:42 pm said:

    This worked for me; I have been searching on the web for several days on how to boot up linux mint 9 x64 into a cli text mode but nothing has worked. But this worked!!!!
    How groovy is that!?!?

    Thanks a bunch for something that actually worked.

    Dave

  18. rtoledo2002 on May 17, 2011 at 1:31 am said:

    the post above that talks about

    mv /etc/rc2.d/S30gdm /etc/rc2.d/K70gdm

    needs to be updated for debian 64 6.0.1 TO

    mv /etc/rc2.d/S22gdm3 /etc/rc2.d/K70gdm

    and this worked for me tody with a fresh install in Oracle’s VM 05-22-2011

  19. RJB on October 17, 2011 at 6:23 pm said:

    It looks like this is long outdated. Probably this should be updated by admin.

    The following is not helpful advice for those who want to keep gdm, but not autostart it on boot, but is useful for those installing Debian for the first time:

    Use the basic install. Don’t install X or any GUI applications on your initial Debian installation.
    Don’t install GDM or gnome.

    Install only the GUI stuff you will actually use and start anything you need to start by making entries in your user .xinitrc file, then use ‘startx’ to launch.

    If want gnome and gdm, but don’t want it to autostart, then the /etc/rcX files are the place to go. Do some exploration in each new version of Debian (or Ubuntu, or Linux Mint…) to find out where these are.

  20. Matt Gilbert on November 4, 2011 at 8:20 pm said:

    I’m a long time slack user, but I thought I’d give debian a try on a spare machine I have. I installed Debian 6.0.3 and I found this page and did the update-rc.d -f gdm3 remove thing and it worked fine and rebooted to CLI no problem, and startx starts the GUI no problem. See the man update-rc.d page 🙂 Note that I used gdm3 and not gdm, as there is no /usr/bin/gdm but there is a /usr/gdm3 so that did it. Before that I battled with getting rid of Grub and it’s EFI and UUID crazy anti-bios stuff did a proper /etc/fstab and replaced GRUB with LILO, This may turn out to be a pretty decent system after all.

  21. sae on February 24, 2012 at 2:30 am said:

    I have installing gui on ubuntu server 11.10 ,
    I put correct password,but can’t access to my server, how to fix it.

  22. Eu2200 on June 5, 2012 at 6:00 am said:

    It worked for me like Marco said on Debian 6.0.4

    Open the /etc/default/grub file, locate the following line:

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet”

    and change it to:

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet text”

    and don’t forget to run ‘update-grub’ afterwards to update.

    [
    #update-rc.d -f gdm remove
    didn’t work for me
    ]

  23. Greg Tari on August 6, 2012 at 6:20 pm said:

    I’ve came here 5 times so far for different systems because remembering this isn’t on my top priority.. anyway I scroll straight down to your post because gdm remove doesn’t work for anything on any machine 😛 thanks!

  24. nico on March 20, 2013 at 6:05 am said:

    if you change the number after S to 22, shouldnt you also change the number after K to 78 ?
    see man update-rc.d

  25. Pablo on April 27, 2014 at 2:37 am said:

    It works! Thank you.

  26. Alexander Declama on June 3, 2014 at 11:14 pm said:

    As a Debian newb, I found that update-rc.d -f gdm3 remove worked.

  27. tolou.sobh on September 7, 2015 at 7:27 am said:

    hi,,,every body
    i can’t access my user in debianGUI at the startup of my system because of my full disk! i want login in terminal mode at first of boot of my pc.how can i do it?

Leave a comment

Your email address will not be published. Required fields are marked *

« Howto display the number of processors in Linux
Mount a remote file system through ssh Using sshfs »

Sponsored Link

    Cheap Web Hosting

Categories

  • Backup
  • Database
  • Free-Tools
  • General
  • Monitoring
  • Network
  • Other Linux
  • Package-Mgmt
  • Paloalto Firewalls
  • Security
  • Webserver

Sponsored Link

Archives

Sponsored Link

Favourite Sites

Ubuntu Geek
  • About Author
  • Contact
  • Debian Hosting
  • Popular Posts
  • Privacy Policy
  • Sitemap