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 am working on creating a real time kernel with RT-PREEMPT patch. I have created this kernel without graphic desktop. It comes up in the terminal mode with login prompt. The requirement is, it should boot and directly go to the shell prompt with root permission, without asking for login. How can this be done? Can you help me?

share|improve this question


I have gotten it to work, but it is slightly different on Ubuntu.

  1. First install mingetty:

    sudo apt-get install mingetty
  2. Edit /etc/init/tty1.conf:


    exec /sbin/getty -8 38400 tty1


    exec /sbin/mingetty --autologin root --noclear tty1
  3. Reboot and test.

This worked for me on Ubuntu 12.04, if this works for you and you need more tty's to autologin start changing tty2.conf - tty6.conf and you should be good to go.

share|improve this answer
Testing it in a VM as we speak. – Jochen Oonincx Jul 27 '12 at 7:06
You'll want the exec . – geirha Jul 27 '12 at 7:14
D'oooh. You are absolutely right. I will edit :P – Jochen Oonincx Jul 27 '12 at 7:31
working for ubuntu-server 14.04 also. – harshitgupta Jun 25 '14 at 20:16
/sbin/getty seems to supporting --auto-login argument as of in Ubuntu 14.04.02 now – VarunAgw Aug 19 '15 at 14:31

You can do this without any additional software

sudo vim /etc/inittab

comment out

1:2345:respawn:/sbin/getty 115200 tty1

and replace it with

1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1

so you are left with this

#1:2345:respawn:/sbin/getty 115200 tty1
1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1
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.