CentOS7更改开机自动登录

  用vi打开/etc/gmd/custom.conf配置文件

vi /etc/gmd/custom.conf

# GDM configuration storage

[daemon]

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
#Enable=true

  在[daemon]下写入以下两行代码保存退出

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=root

  更改完成。