使用root账户进入系统后,打开/etc/gdm目录下的custom.conf文件,在[daemon]下添加两行:
AutomaticLoginEnable=True
AutomaticLogin=root
# GDM configuration storage
[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false
AutomaticLoginEnable=True
AutomaticLogin=root
[security]
[xdmcp]
[chooser]
[debug]
# Uncomment the line below to turn on debugging
#Enable=true
修改完成之后,下次登录centos8时自动使用root账号登录啦~~