Wed Jul 09, 2014 11:49 am
Sat Jul 19, 2014 11:55 am
Thu Sep 25, 2014 7:08 pm
Create the following file (and leading directories):
(*slash*)etc/systemd/system/getty@tty1.service.d/autologin.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin username --noclear %I 38400 linux
How do I change the default number of gettys?
Currently, only one getty is launched by default. If you switch to another tty, a getty will be launched there (socket-activation style). In other words, [Ctl] [Alt] [F2] will launch a new getty on tty2.
By default, the number of auto-activated gettys is capped at six. Thus [F7] through [F12] won't launch a getty.
If you want to change this behavior, then edit (*slash*)etc/systemd/logind.conf and change the value of NAutoVTs. If you want all [Fx] keys to start a getty, increase the value of NAutoVTs to 12. If you are forwarding journald to tty12, increase the value of NAutoVTs to 11 (thus leaving tty12 free).
You can also pre-activate gettys which will be running from boot.
To add another pre-activated getty, simply place another symlink for instantiating another getty in the (*slash*)etc/systemd/system/getty.target.wants/ directory:
# ln -sf /lib/systemd/system/getty@.service (*slash*)etc/systemd/system/getty.target.wants/getty@tty9.service
# systemctl start getty@tty9.service
To remove a getty, simply remove the getty symlinks you want to get rid of in the etc/systemd/system/getty.target.wants/ directory:
# rm (*slash*)etc/systemd/system/getty.target.wants/getty@{tty5,tty6}.service
# systemctl stop getty@tty5.service getty@tty6.service
Thu Sep 25, 2014 7:35 pm
Fri Sep 26, 2014 7:49 pm
[Service]
Type=simple
ExecStart=
ExecStart=-/sbin/agetty --autologin username --noclear %I 38400 linux