在Ubuntu中触发自动登录有图形界面和命令行两种方法:
/etc/gdm3/custom.conf,找到[daemon]部分,添加或修改AutomaticLoginEnable = true和AutomaticLogin = 你的用户名,保存后运行sudo systemctl restart gdm,重启系统即可。若使用LightDM,编辑/etc/lightdm/lightdm.conf,在[SeatDefaults]中添加autologin-user=用户名和autologin-user-timeout=0,保存后重启LightDM服务。