With SysV init, by default, getty processes are started on the first six virtual consoles. They can be accessed with the Ctrl+Alt+F1 to Ctrl+Alt+F6 key combination. systemd starts the getty processes only when needed. That means, only after you change to, for instance, the second virtual terminal by pressing Ctrl+Alt+F2 is the getty process started in that terminal.
The /usr/lib/systemd/system/getty@.service file is responsible for the virtual terminals (/dev/tty[X]). /usr/lib/systemd/system/serial-getty@.service is responsible for all other terminals, such as a serial terminal on /dev/ttyS0.
Systemd provides a template unit file for serial getty. Template file can be found here
1. First copy the template:
# cp /usr/lib/systemd/system/serial-getty@.service /etc/systemd/system/serial-getty@ttyS0.service
2. Then edit the file and modify the agetty line:
[Service] ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM <-- Change this parameter Type=idle
3. Create a symlink:
# ln -s /etc/systemd/system/serial-getty@ttyS0.service /etc/systemd/system/getty.target.wants/
4. Reload the daemon and start the service:
# systemctl daemon-reload # systemctl start serial-getty@ttyS0.service # systemctl enable serial-getty@ttyS0.service