Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed Ubuntu 12.04 on one of 4 machines and am configuring it. When the machine is used in "production" mode it will be headless and will need to boot into single user mode automatically (and start an application). It will need partitions mounted, networking, ssh, etc. I want to test booting into single user mode now so as to get it right before installing/upgrading other machines to 12.04.

share|improve this question
you really want boot the machine in single user mode (run level 1) or at run level 3 (all services up, just command line without X server). And to startup an application you always can use upstart script or something like that. A link who could explain better the run levels: – Pipe Feb 7 '13 at 10:43
@pipe Right but the link does not describe Ubuntu 12.04 boot modes. – Nate Lockwood Feb 7 '13 at 19:25
up vote 1 down vote accepted

I don't know how I missed this when I searched the question but the answer was provided by Mr. Gruber: How to autologin (without entering username and password)(in text mode)

As sudo ,edit the file /etc/default/grub and change:




Save and then enter the command

sudo update-grub

GRUB is now configured to boot to text mode

As sudo edit the file /etc/init/tty1.conf an dchange the line:

exec /sbin/getty -8 38400 tty1  


exec /sbin/getty -8 38400 tty1 -a user-name

Where "user-name" is the user who will be automatically logged in.

It appears to work correctly for me.

To get to a GUI envirnment enter startx. Be sure to do this as a "regular" user as using sudo the file .Xauthority will have root as the owner and will cause an endless sequence of requesting passwords ...

Mr. Gruber mentions using tty6 in tty1.conf, I think you must not edit the whatever TTY is in that line unless you have a rescue disk/usb-stick available!

I'll work on the auto start of a script later ...

share|improve this answer

Your Answer


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.