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.

I've installed Ubuntu 12.04 & and edited the /etc/default/grub file to auto boot into text mode. but every time I turn on the computer it asks for username and password (in text mode), I wanted it to automatically login without asking for username and password, so in graphical mode I went to "System Setting->User Accounts" and checked the "Automatic login", but it didn't work. so what should I do to automatically log in even in text mode?

share|improve this question
    
Try this link –  Peachy Aug 13 '12 at 10:00
    
This question adds the condition that a userid and password not be entered in text mode in order to sign on. –  John S Gruber Aug 20 '12 at 3:53
    
possible duplicate of Where is the /etc/inittab file or how to set the default runlevel –  hbdgaf Aug 22 '12 at 1:51

5 Answers 5

up vote 3 down vote accepted

To boot into text mode

sudo vim /etc/default/grub

and change the following line:

GRUB_CMDLINE_LINUX_DEFAULT="text"

exit and enter:

 sudo update-grub

Automatically login in text mode without specifying userid or password

Add -a <your-user-name> to the line:

exec /sbin/getty -8 38400 tty1

in file /etc/init/tty1.conf

like so:

exec /sbin/getty -8 38400 tty6 -a gruber

/etc/init/tty1.conf is the upstart job that runs at the appropriate time to start the terminal session on tty1. Adding the -a option tells getty to call the login program with the -f option to sign that user in, bypassing the user prompt from getty and the password prompt from login.

Upstart is the Ubuntu system that operates as the kernel init process (process 1).

I tested this on my tty6 and it worked great. Because of the upstart respawn line if you exit the shell it will start back up again automatically.

share|improve this answer

open terminal and do as

sudo kate /etc/default/grub

then find this line and change as shown below

GRUB_CMDLINE_LINUX_DEFAULT="text"

now close the editor and do as

sudo update-grub 

and do restart now

share|improve this answer
    
I like this answer, but you may want to add a from: to: section for the find this line and change part –  hbdgaf May 26 '12 at 7:31
    
I've followed the instructions but it still boots to the GUI. Could it be because I'm using virtual box? –  errorhandler May 26 '12 at 7:37

sudo gedit etc/default/grub

and replace

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="text"

Also comment GRUB_HIDDEN_TIMEOUT=0 This line is for unhiding the GRUB menu (comment is to put "#" in the line )

sudo update-grub

and to start the x just type startx

share|improve this answer
    
No, I've done this before, I just want that the text mode doesn't ask for username and password –  Navid777 Aug 13 '12 at 10:15

Pardon me for asking, but why do you wan't to. There might be a better solution like using the alternative iso image or going into recovery mode (which should have some kind of command line only interface in it somewhere). If you could tell me your problem that you need solved in a different way and your situation I might be able to help you more, but what I recommend trying is booting to recovery mode.

share|improve this answer
sudo update-rc.d -f gdm remove

If you use Kubuntu, replace gdm with kdm in the command above.

if it still does the graphical boot/shutdown, but it will drop you at the command line after boot. You should probably check the grub configuration. For that Click Here

share|improve this answer
    
I tried that but it still boots into the GUI –  errorhandler May 26 '12 at 7:18
    
Then you may want to try GRUB configuration. –  Mitch May 26 '12 at 7:19

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.