Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hi I have ubuntu server 10.04 installed and I also installed the following:

su
aptitude install xorg xfce4
aptitude install <name of GUI browser, I use firefox>
aptitude install gedit
aptitude install gnome-terminal

Now when I restart the system it goes to the GUI login, what I am really after is a system that loads the CLI by default and then I can use startx to load the GUI when really necessary. I am trying to learn CLI but I would like to retain access to the GUI for now. And, how can I switch between CLI and GUI anytime?

share|improve this question
add comment

2 Answers

up vote 10 down vote accepted

Modify your file /etc/default/grub with

GRUB_CMDLINE_LINUX_DEFAULT="text"

and do sudo update-grub. The machine will boot in text mode.

To start the graphical interface you do

sudo service gdm start
share|improve this answer
3  
@drtanz: So you could consider accepting the answer :) –  enzotib Jul 7 '11 at 10:50
add comment

You can either set the display manager, gdm (for Gnome)/kdm (for KDE)/etc, to not start on boot, or you can just remove the packages.

To prevent the display manager from starting, run:

sudo update-rc.d -f remove gdm   #For Gnome
sudo update-rc.d -f remove kdm   #For KDE

or, to remove the display manager:

sudo apt-get purge gdm           #For Gnome
sudo apt-get purge kdm           #For KDE
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.