Occasionally I post things here because I may need them in the future… this is probably one of those things, which is setting a Raspberry Pi to auto-magically login to the shell (not the desktop) on boot.

Install and configure Raspbian as you normally would, setting it to boot up to the command line, not the desktop.

Boot the Pi and login as the user pi, and then run the following command:

sudo nano /etc/inittab

Find the following line:

1:2345:respawn:/sbin/getty --noclear 38400 tty1

and comment it out by adding a # to the front:

#1:2345:respawn:/sbin/getty --noclear 38400 tty1

Just under it, add this line:

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

Save the file, quit nano, and reboot.

Obviously this can pose a security risk, just like any other auto-login procedure. If you’re using a Raspberry Pi that is not connected to the network, and doesn’t have a keyboard attached, and is secured in a case, there’s a bit less of a concern.

(Most of this info is from the post Auto Login and Auto Start in Raspberry Pi. Thanks!)

Comments are closed.

« | »

buy the button:

Buy The Button