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.
7 Answers
To do that just follow this:
Go to CLI mode:
CTRL + ALT + F1
Stop GUI service on Ubuntu:
sudo service lightdm stopor if you're using a version of Ubuntu before 11.10, run:
sudo service gdm stop
-
2Perhaps add more Display managers, for the other variants of Ubuntu. – Uri Herrera Jun 09 '12 at 16:25
-
2running this from terminal `sudo service lightdm stop` worked for me. – razzak Dec 08 '15 at 11:53
-
2This simple service stopping and starting works - but it is the full canonical mode change? In the old times one entered non-graphical mulit-user mode by 'runlevel 3' and back graphical by 'runlevel 5'. With systemd this should translate to (A) `systemctl isolate multi-user` and (B) `systemctl isolate graphical`. (A) indeed closes GUI, (B) brings up the login screen again - which however yields errors ("Could not connect to bus session: Failed to connect to socket /run/user/1000/bus: Connection refused") when trying to login. Why? – kxr Apr 29 '19 at 20:14
Use
sudo service gdm stop
to stop the GUI and
sudo service gdm start
to start it again
- 86,013
- 17
- 224
- 214
-
2
-
I'll accept yours because my question was too way specific. Actually I needed to run telinit 1 to completely disable not required processes. – dierre May 31 '11 at 12:11
-
With Ubuntu 18.04 this turns it off but doesn't turn it back on...any ideas? – EODCraft Staff Apr 18 '21 at 10:08
If your purpose is to temporarily disable GUI - you can stop the lightdm service ( or whichever greeter you're using ) with sudo service lightdm stop (14.04 and earlier) or sudo systemctl stop lightdm (since 15.04) from tty1, as shown by others already.
If your purpose to boot into command line for extended period of time between reboots, you can open /etc/default/grub with the choice of your text editor. I personally use nano, so for me the command would be sudo nano /etc/default/grub. Now, find GRUB_CMDLINE_LINUX="" to GRUB_CMDLINE_LINUX="text". Or you can create two lines, one commented , one uncommented like so:
#GRUB_CMDLINE_LINUX="text"
GRUB_CMDLINE_LINUX=""
Once necessary, just uncomment the line for which mode you wanna enter. Upon completing editing the /etc/default/grub file, save it, and run sudo update-grub to make the configurations loaded into the actual grub.cfg file. Reboot, and you should enter the command line directly.
- 103,293
- 19
- 273
- 492
Start by logging out and striking CtrlAltF1, then log on.
On Kubuntu stopping the GUI can be done through sudo /etc/init.d/kdm stop. On Ubuntu this will probably be sudo /etc/init.d/gdm stop.
Enter your password when prompted.
dm stands for Display Manager, check ls /etc/init.d/ which dm is available when it is not gdm.
To restart it just change stop to start.
You probably automatically change to the GUI, if not strike: CtrlAltF7
- 5,593
- 2
- 25
- 35
-
obysr's `lightdm` sounds familiar. That would make the command: `sudo /etc/init.d/lightdm stop` – jippie Jun 09 '12 at 07:15
I know you are not asking this specifically, but you need to install the nvidia-current driver.
You can do this from a gui. Just run jockey-gtk or search for "Additional Drivers" from the dash. Once it is installed, open Nvidia Settings and go from there.
- 51,091
- 31
- 161
- 256
to stop GUI from auto-loading
sudo systemctl set-default multi-user
to start it again:
sudo systemctl set-default graphical
- 103
- 4
- 101
- 1
You could open gnome-terminal and type sudo telinit 1. This would drop you to run level 1(single user mode) and kill the gui services.
- 32,274
- 27
- 118
- 177
- 94
- 1
-
-
-
@bertmanphx: you are not aware of ubuntu startup process and runlevels used. – enzotib May 31 '11 at 12:36
-
@dierre: I think it is not correct to edit answers in the core, like changing 3 to 1. This invalidates OP intentions and my objection. – enzotib May 31 '11 at 12:42
-
2Well the answer was actually useful so I thought to correct the wrong parts. – dierre May 31 '11 at 12:43
-
btw the editing was accepted so I don't know how to behave right now. Is it rigth or wrong? – dierre May 31 '11 at 12:44
-
@dierre - if you are unsure, ask on [meta](http://meta.askubuntu.com/). – dv3500ea May 31 '11 at 14:38