Leon Anavi
IT Tips && Tricks


Created: 24.03.2018 13:13 Last Modified: 24.03.2018 13:13 Views: 9189
Keywords: console, agetty, autologin, debian, login, Raspberry Pi, raspbian, serial, serial-getty, systemd

Enable Automatic Login on Raspberry Pi through Serial Console

This tutorial will explain you how to automatically login on the serial console to a Raspbian image with systemd by simply powering the Pi on. Automatic login removes the need to type user name and password on boot. Although this is convenient solution for certain use cases, for example testing, keep in mind that it brings security risks because anyone can login.

Open /lib/systemd/system/serial-getty@.service and change the following line from:

ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM


ExecStart=-/sbin/agetty --autologin pi --noclear --keep-baud 115200,38400,9600 %I $TERM

This way the systemd service with execute agetty and automatically login as user pi.

  Home | About | Contact | Disclaimer | Sitemap 2009-2022 Leon Anavi. All rights reserved.