Raspbian Jessie AutoLogin to Console

Updated on 23rd May 2017

With previous versions of Raspbian you could edit inititab to make your Pi autologin to any account. Raspbian Jessie does not have inittab. The init system sysvinit has been replaced by systemd.

However setting Pi to autologin to console using pi user account is very easy. All you have to do is run raspi-config. You may launch this from a terminal session by the command.

sudo raspi-config

Alternatively, from the Raspbian Jessie desktop, choose Menu → Preferences → Raspberry Pi Configuration.

If you launched raspi-config from command prompt it looks like below:

Raspbian Jessie raspi-config

Scroll down to 3 Boot Options.

Select option B1 Desktop / CLI

Raspbian Jessie raspi-config

Select B2 Console AutoLogin

Raspbian Jessie raspi-config

Save and exit the configuration and reboot.

The Raspberry Pi will now boot to console everytime. You may setup a script to run at startup if you are planning to operate pi headlessly. To do this, edit /etc/profile. Each time a login shell is spawned all commands in /etc/profile are executed.

sudo nano /etc/profile

To execute a script /home/pi/myscript.sh, add the following line

./home/pi/myscript.sh

Now everytime pi is powered on, it will autologin to pi user and execute your startup script, which presumably will take care of everything you it to do in headless mode.


Post a comment

Got a question about this article? Ask our forum

Name

Your Comment

Email (We dont publish it)

Comments

Nothing yet..be the first to share wisdom.