How do I stop GUI?

I need to enter the command line alone with no GUI to install the official NVIDIA drivers. I'm trying to get my computer to work over HDMI and someone on Youtube shows how but you have to be in the Nvidia settings program.


To do that just follow this:

  1. Go to CLI mode:

    CTRL + ALT + F1

  2. Stop GUI service on Ubuntu:

    sudo service lightdm stop
    

    or if you're using a version of Ubuntu before 11.10, run:

    sudo service gdm stop
    

Use

sudo service gdm stop

to stop the GUI and

sudo service gdm start

to start it again