systemd - How to create ubuntu server 16.04 autologin? - Ask Ubuntu
something has changed in server 16.04 lts, can't find tty1, need make auto-login on tty1 (in console mode), in 14.04 lts can make work.
i can't find /etc/init/tty1.conf
how to, or link?
in ubuntu 16.04, uses systemd
, method different. i'll quote relevant bits of related post how override or configure systemd services?:
say want have tty2 autologin user (this not advisable, example). tty2 run
getty@tty2
service (tty2
being instance of template/lib/systemd/system/getty@service
). this, have modifygetty@tty2
service.[…]
in particular, have change
execstart
line, is:$ systemctl cat getty@tty2 | grep exec execstart=-/sbin/agetty --noclear %i $term
to override this, do:
sudo systemctl edit getty@tty2
and add:
[service] execstart= execstart=-/sbin/agetty -a <username> --noclear %i $term
[…]
now:
$ systemctl cat getty@tty2 | grep exec execstart=-/sbin/agetty --noclear %i $term execstart= execstart=-/sbin/agetty -a <username> --noclear %i $term
and if do:
sudo systemctl restart getty@tty2
and press ctrlaltf2, presto! i'll logged account on tty.
Comments
Post a Comment