1、用root用户登录系统
2、输入编辑命令 vim /etc/gdm/custom.conf
3、在[daemon]下添加两行命令
AutomaticLoginEnable=True AutomaticLogin=root
4、输入 reboot 重启机器即可