2

How can i stop auto serial port auto login console and getty in raspbian jessie os and why /etc/inittab/ is empty ?

Where can i get this

#Spawn a getty on Raspberry Pi serial line T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

in raspbian jessie ?

thanks salwan

lese
  • 2,726
salwan
  • 21

1 Answers1

2

/etc/inittab is empty because it is a thing of the past. Do not concern yourself with it. It is now an irrelevance for you with your operating system.

Serial-port getty is auto-started by systemd as a consequence of a serial-getty@AMA0.service service unit being auto-generated when your system is configured with ttyAMA0 as the console. The existence of the service unit is controlled by where you have configured your console device to be, with boot-loader options, and the generator automatically enables it. Everything else is done in the usual systemd way as for any other service:

  • Manually start and stop the service with:
    • systemctl start serial-getty@ttyAMA0.service
    • systemctl stop serial-getty@ttyAMA0.service
  • Set the service to run automatically at bootstrap, or not, with:
    • systemctl enable serial-getty@ttyAMA0.service
    • systemctl disable serial-getty@ttyAMA0.service
  • Mask out the automatic enable done by the generator:
    • systemctl mask serial-getty@ttyAMA0.service

Further reading

JdeBP
  • 68,745